OWLNext 6.32
Public Member Functions | Protected Member Functions
owl::TMDIChild Class Reference

#include <mdichild.h>

Inheritance diagram for owl::TMDIChild:
owl::TFrameWindow owl::TWindow owl::TEventHandler owl::TStreamableBase

List of all members.

Public Member Functions

 TMDIChild (TMDIClient &parent, LPCTSTR title=0, TWindow *clientWnd=0, bool shrinkToClient=false, TModule *module=0)
 TMDIChild (HWND hWnd, TModule *module=0)
bool PreProcessMsg (MSG &msg)
bool ShowWindow (int cmdShow)
bool EnableWindow (bool enable)
void Destroy (int retVal=0)

Protected Member Functions

virtual TPerformCreateReturnType PerformCreate (int deprecated_argument=0)
virtual TResult DefWindowProc (uint msg, TParam1 p1, TParam2 p2)
void EvMDIActivate (HWND hWndActivated, HWND hWndDeactivated)
bool EvNCActivate (bool active)
void EvMenuSelect (uint menuItemId, uint flags, HMENU hMenu)
void EvEnterIdle (uint source, HWND hWndDlg)

Detailed Description

TMDIChild defines the basic behavior of all MDI child windows. Child windows can be created inside the client area of a parent window. Because child windows exist within, and are restricted to the parent window's borders, the parent window defined before the child is defined. For example, a dialog box is a window that contains child windows, often referred to as dialog box controls.

To be used as MDI children, classes must be derived from TMDIChild. MDI children can inherit keyboard navigation, focus handling, and icon support from TFrameWindow. TMDIChild is a streamable class.


Constructor & Destructor Documentation

owl::TMDIChild::TMDIChild ( TMDIClient parent,
LPCTSTR  title = 0,
TWindow clientWnd = 0,
bool  shrinkToClient = false,
TModule module = 0 
)

Constructor for a TMDIChild

Creates an MDI child window of the MDI client window specified by parent, using the specified title, client window (clientWnd) and instance (inst). Invokes the TFrameWindow base class constructor, supplying parent, title, clientWnd, inst, and indicating that the child window is not to be resized to fit. Invokes the TWindow base class constructor, specifying parent, title, and inst. The window attributes are then adjusted to include WS_VISIBLE, WS_CHILD, WS_CLIPSIBLINGS, WS_CLIPCHILDREN, WS_SYSMENU, WS_CAPTION, WS_THICKFRAME, WS_MINIMIZEBOX, and WS_MAXIMIZEBOX. The dimensions of the window are set to the system default values.

References owl::TFrameWindow::Init(), and owl::TWindow::Init().

owl::TMDIChild::TMDIChild ( HWND  hWnd,
TModule module = 0 
)

Constructor for a TMDIChild which is being used in a DLL as an alias for a non-OWL window

Creates an MDI child window object from a preexisting window, specified by hWnd. The base class TFrameWindow constructor is invoked, specifying this hWnd, as well as the specified inst. The base class TWindow constructor is invoked, supplying the hWnd and inst parameters.


Member Function Documentation

TResult owl::TMDIChild::DefWindowProc ( uint  msg,
TParam1  param1,
TParam2  param2 
) [protected, virtual]

Overrides TWindow::DefWindowProc to provide default processing for any incoming message the MDI child window does not process. In addition, DefWindowProc handles the following messages: WM_CHILDACTIVATE, WM_GETMINMAXINFO, WM_MENUCHAR, WM_MOVE, WM_SETFOCUS, WM_SIZE, and WM_SYSCOMMAND.

Reimplemented from owl::TWindow.

References owl::TWindow::GetHandle(), owl::TWindow::IsFlagSet(), and owl::wfAlias.

void owl::TMDIChild::Destroy ( int  retVal = 0) [virtual]

Destroys the interface element associated with the TMDIChild. Calls EnableAutoCreate for each window in the child list so that the children are also re-created when the parent window is re-created.

Reimplemented from owl::TWindow.

References owl::TWindow::ForEach(), owl::TWindow::GetHandle(), owl::TWindow::GetParentO(), and owl::TWindow::SetHandle().

bool owl::TMDIChild::EnableWindow ( bool  enable) [virtual]

Overrides TWindow's virtual function. Enables a child window.

Perform special processing for enabling MDI children to make sure that the MDI client maintains the window list correctly

Reimplemented from owl::TWindow.

References owl::TWindow::GetHandle(), and owl::TWindow::GetParentO().

void owl::TMDIChild::EvEnterIdle ( uint  source,
HWND  hWndDlg 
) [protected]

The default message handler for WM_ENTERIDLE.

Reimplemented from owl::TWindow.

References owl::TWindow::ForwardMessage(), and owl::TWindow::GetApplication().

void owl::TMDIChild::EvMDIActivate ( HWND  hWndActivated,
HWND  hWndDeactivated 
) [protected]
void owl::TMDIChild::EvMenuSelect ( uint  menuItemId,
uint  flags,
HMENU  hMenu 
) [protected]

The default message handler for WM_MENUSELECT.

Reimplemented from owl::TWindow.

References owl::TWindow::ForwardMessage(), and owl::TWindow::GetApplication().

bool owl::TMDIChild::EvNCActivate ( bool  active) [protected]

Responds to a request to change a title bar or icon.

Don't allow NC Activation if we are only temporarily unhidden for window menu maintainance

Reimplemented from owl::TWindow.

References owl::TWindow::IsFlagSet(), and owl::wfUnHidden.

TWindow::TPerformCreateReturnType owl::TMDIChild::PerformCreate ( int  deprecated_argument = 0) [protected, virtual]

Creates the interface element associated with the MDI child window. Otherwise, it notifies the parent MDI client window to create the child window's interface element. The supplied menuOrId parameter is ignored because MDI child windows cannot have menus.

An MDI Child creates its GetHandle() by sending an MDI Create packet to the MDI client.

Reimplemented from owl::TWindow.

References owl::TWindow::GetCaption(), owl::TWindow::GetClassName(), owl::TWindow::GetHandle(), owl::TWindow::GetModule(), and owl::TWindow::GetParentO().

bool owl::TMDIChild::PreProcessMsg ( MSG &  msg) [virtual]

Performs preprocessing of window messages for the MDI child window. If keyboard handling is enabled the parent client window's TMDIClient_PreProcessMsg member function is called to preprocess messages. In this case, the return value is true. Otherwise, TFrameWindow::PreProcessMsg is called and its return value becomes the return value of this member function.

If the MDI child has requested keyboard navigation then TFrameWindow's PreProcessMsg() member function will call ::IsDialogMessage() which will eat the event and the MDI client window won't get a chance to do MDI accelerator processing

So, we will do it here to make sure it gets done

Reimplemented from owl::TFrameWindow.

References owl::TWindow::GetHandle(), and owl::TWindow::GetParentO().

bool owl::TMDIChild::ShowWindow ( int  cmdShow) [virtual]

Overrides TWindow's virtual function. Displays a child window according to the value of cmdShow.

Perform special processing for showing MDI children to make sure that the MDI client maintains the window list correctly

Reimplemented from owl::TWindow.

References owl::TWindow::GetHandle(), and owl::TWindow::GetParentO().


The documentation for this class was generated from the following files: