## wxMDIChildFrame

An MDI child frame is a frame that can only exist on a wxMDIClientWindow, which is itself a child of wxMDIParentFrame.

Derived from

wxFrame
wxWindow
wxEvtHandler
wxObject

Include files

<wx/mdi.h>

Window styles

wxCAPTION | Puts a caption on the frame.
wxDEFAULT_FRAME_STYLE | Defined as wxMINIMIZE_BOX | wxMAXIMIZE_BOX | wxTHICK_FRAME | wxSYSTEM_MENU | wxCAPTION.
wxICONIZE | Display the frame iconized (minimized) (Windows only).
wxMAXIMIZE | Displays the frame maximized (Windows only).
wxMAXIMIZE_BOX | Displays a maximize box on the frame (Windows and Motif only).
wxMINIMIZE | Identical to wxICONIZE.
wxMINIMIZE_BOX | Displays a minimize box on the frame (Windows and Motif only).
wxRESIZE_BORDER | Displays a resizeable border around the window (Motif only; for Windows, it is implicit in wxTHICK_FRAME).
wxSTAY_ON_TOP | Stay on top of other windows (Windows only).
wxSYSTEM_MENU | Displays a system menu (Windows and Motif only).
wxTHICK_FRAME | Displays a thick frame around the window (Windows and Motif only).

See also window styles overview.

Remarks

Although internally an MDI child frame is a child of the MDI client window, in wxWindows you create it as a child of wxMDIParentFrame. You can usually forget that the client window exists.

MDI child frames are clipped to the area of the MDI client window, and may be iconized on the client window.

You can associate a menubar with a child frame as usual, although an MDI child doesn't display its menubar under its own title bar. The MDI parent frame's menubar will be changed to reflect the currently active child frame. If there are currently no children, the parent frame's own menubar will be displayed.

See also

wxMDIClientWindow, wxMDIParentFrame, wxFrame

Members

wxMDIChildFrame::wxMDIChildFrame
wxMDIChildFrame::~wxMDIChildFrame
wxMDIChildFrame::Activate
wxMDIChildFrame::Create
wxMDIChildFrame::Maximize
wxMDIChildFrame::Restore

### wxMDIChildFrame::wxMDIChildFrame

wxMDIChildFrame()

Default constructor.

wxMDIChildFrame(wxMDIParentFrame* parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "frame")

Constructor, creating the window.

Parameters

parent

The window parent. This should not be NULL.

id

The window identifier. It may take a value of -1 to indicate a default value.

title

The caption to be displayed on the frame's title bar.

pos

The window position. A value of (-1, -1) indicates a default position, chosen by either the windowing system or wxWindows, depending on platform.

size

The window size. A value of (-1, -1) indicates a default size, chosen by either the windowing system or wxWindows, depending on platform.

style

The window style. See wxMDIChildFrame.

name

The name of the window. This parameter is used to associate a name with the item, allowing the application user to set Motif resource values for individual windows.

Remarks

None.

See also

wxMDIChildFrame::Create

### wxMDIChildFrame::~wxMDIChildFrame

~wxMDIChildFrame()

Destructor. Destroys all child windows and menu bar if present.

### wxMDIChildFrame::Activate

void Activate()

Activates this MDI child frame.

See also

wxMDIChildFrame::Maximize, wxMDIChildFrame::Restore

### wxMDIChildFrame::Create

bool Create(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "frame")

Used in two-step frame construction. See wxMDIChildFrame::wxMDIChildFrame for further details.

### wxMDIChildFrame::Maximize

void Maximize()

Maximizes this MDI child frame.

See also

wxMDIChildFrame::Activate, wxMDIChildFrame::Restore

### wxMDIChildFrame::Restore

void Restore()

Restores this MDI child frame (unmaximizes).

See also

wxMDIChildFrame::Activate, wxMDIChildFrame::Maximize