extern wxWindowList wxModelessWindows; // from dialog.cpp
extern wxMenu *wxCurrentPopupMenu;
-extern const wxChar *wxMDIFrameClassName;
+extern const wxChar *wxMDIFrameClassName; // from app.cpp
extern const wxChar *wxMDIChildFrameClassName;
+extern const wxChar *wxMDIChildFrameClassNameNoRedraw;
+
extern wxWindow *wxWndHook; // from window.cpp
extern void wxAssociateWinWithHandle(HWND hWnd, wxWindow *win);
if (style & wxCLIP_CHILDREN)
msflags |= WS_CLIPCHILDREN;
- wxWindow::MSWCreate(m_windowId, parent, wxMDIFrameClassName, this, title, x, y, width, height,
- msflags);
+ if ( !wxWindow::MSWCreate(m_windowId,
+ parent,
+ wxMDIFrameClassName,
+ this,
+ title,
+ x, y, width, height,
+ msflags) )
+ {
+ return FALSE;
+ }
wxModelessWindows.Append(this);
MDICREATESTRUCT mcs;
- mcs.szClass = wxMDIChildFrameClassName;
+ mcs.szClass = style & wxNO_FULL_REPAINT_ON_RESIZE
+ ? wxMDIChildFrameClassNameNoRedraw
+ : wxMDIChildFrameClassName;
mcs.szTitle = title;
mcs.hOwner = wxGetInstance();
if (x > -1)
mcs.lParam = 0;
- DWORD Return = SendMessage(GetWinHwnd(parent->GetClientWindow()),
- WM_MDICREATE, 0, (LONG)(LPSTR)&mcs);
-
- //handle = (HWND)LOWORD(Return);
- // Must be the DWORRD for WIN32. And in 16 bits, HIWORD=0 (says Microsoft)
- m_hWnd = (WXHWND)Return;
+ m_hWnd = (WXHWND)::SendMessage(GetWinHwnd(parent->GetClientWindow()),
+ WM_MDICREATE, 0, (LONG)(LPSTR)&mcs);
wxWndHook = NULL;
wxAssociateWinWithHandle((HWND) GetHWND(), this);
return TRUE;
}
+ bool processed;
if (GetMenuBar() && GetMenuBar()->FindItem(id))
{
- ProcessCommand(id);
- return TRUE;
+ processed = ProcessCommand(id);
}
else
- return FALSE;
+ {
+ processed = FALSE;
+ }
- return TRUE;
+ return processed;
}
bool wxMDIChildFrame::HandleMDIActivate(long WXUNUSED(activate),
bool wxMDIChildFrame::MSWTranslateMessage(WXMSG* msg)
{
- return m_acceleratorTable.Translate(GetParent(), msg);
+ return wxFrame::MSWTranslateMessage(msg);
}
// ---------------------------------------------------------------------------