OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
Constructing New Frame Windows

The following TFrameWindow constructor is used to create an entirely new frame window object:

TFrameWindow(TWindow *parent,
const char far *title = 0,
TWindow *clientWnd = 0,
bool shrinkToClient = false,
TModule *module = 0);
ParameterExplanation
parentThe window's parent window object. Use zero if the window you're creating is the main window (which does not have a parent window object). Otherwise, use a pointer to the parent window object. This is the only parameter that you must provide.
titleThe window title, the string that appears in the caption bar of the window. If you do not specify anything, no title is displayed in the title bar.
clientWndLets you specify a client window for the frame window by passing a pointer to the client window object.. If you do not specify anything, by default the constructor gets a zero, meaning that there is no client window.
shrinkToClientLets you specify whether the frame window should shrink to fit the client window. If you do not specify anything, by default the constructor gets false, meaning that it should not fit the frame to the client window.
modulePassed to the base class constructor as the TModule parameter for that constructor. This parameter defaults to 0.

Example

Here are some examples of using this constructor:

void TMyApplication::InitMainWindow()
{
// default is for no client window
SetMainWindow(new TFrameWindow(0, "Main Window"));
}
void TMyApplication::InitMainWindow()
{
// client window is TMyClientWindow
SetMainWindow(new TFrameWindow(0, "Main window with client", new TMyClientWindow, true));
}

See Also