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 wxWidgets 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()
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
id
title
pos
size
style
name
Remarks
None.
See also
~wxMDIChildFrame()
Destructor. Destroys all child windows and menu bar if present.
void Activate()
Activates this MDI child frame.
See also
wxMDIChildFrame::Maximize, wxMDIChildFrame::Restore
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.
void Maximize()
Maximizes this MDI child frame.
See also
wxMDIChildFrame::Activate, wxMDIChildFrame::Restore
void Restore()
Restores this MDI child frame (unmaximizes).
See also
wxMDIChildFrame::Activate, wxMDIChildFrame::Maximize