A SERVICE OF

logo

whether the function AddWindow in the last example has executed yet. If
your main window is not an alias, AddWindow hasn’t executed. If your main
window is an alias, AddWindow has executed:
void
TMyApplication::CheckAddExecute()
{
if(GetMainWindow()->IsFlagSet(wfAlias))
// MainWindow is an alias; AddWindow has executed
else
// MainWindow is not an alias; AddWindow has not executed
}
See page 134 for more information on windows object attributes.
Many frame window attributes can be set after the object has been
Modifying frame
constructed. Y u can change and query object attributes using the functionso
windows
discussed on page 134. Y u can also use the TWindow functions discussedo
on page 135. TFrameWindow provides an additional set of functions for
modifying frame windows:
AssignMenu is typically used to set up a window’ menu before thes
interface element has been created, such as in the InitMainWindow
function or the window object’ constructor or SetupWindow function.s
SetMenu sets the window’ menu handle to the HMENU parameters
passed in.
SetMenuDescr sets the window’ menu description to the TMenuDescrs
parameter passed in.
GetMenuDescr returns the current menu description.
MergeMenu merges the current menu description with the TMenuDescr
parameter passed in.
RestoreMenu restores the window’ menu from Attr Menu.s .
SetIcon sets the icon in the module passed as the first parameter to the
icon passed as a resource in the second parameter.
For more specific information on these functions, refer to the ObjectWindows
Reference Guide.
Decorated frame windows
This section discusses decorated frame windows. Decorated frame
windows are encapsulated in TDecoratedFrame, which is derived from
164
OWL P ogrammer’ Guider s