X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9b73db3c34aefd98080b425459322fa821ae271f..aa3981f2c66ba95a056a6d0dbf983b2d64bc0d84:/src/msw/mdi.cpp diff --git a/src/msw/mdi.cpp b/src/msw/mdi.cpp index 44a6a21faa..cfd5d647ce 100644 --- a/src/msw/mdi.cpp +++ b/src/msw/mdi.cpp @@ -61,7 +61,7 @@ extern wxChar wxMDIFrameClassName[]; extern wxChar wxMDIChildFrameClassName[]; extern wxWindow *wxWndHook; // from window.cpp -extern wxList *wxWinHandleList; +extern void wxAssociateWinWithHandle(HWND hWnd, wxWindow *win); static HWND invalidHandle = 0; @@ -192,10 +192,8 @@ bool wxMDIParentFrame::Create(wxWindow *parent, if (style & wxCAPTION) msflags |= WS_CAPTION; - // Adding WS_CLIPCHILDREN causes children not to be properly - // drawn when first displaying them. -// if (style & wxCLIP_CHILDREN) -// msflags |= WS_CLIPCHILDREN; + if (style & wxCLIP_CHILDREN) + msflags |= WS_CLIPCHILDREN; wxWindow::MSWCreate(m_windowId, parent, wxMDIFrameClassName, this, title, x, y, width, height, msflags); @@ -383,9 +381,9 @@ long wxMDIParentFrame::MSWWindowProc(WXUINT message, break; case WM_SIZE: - // we will leave this message to the base class version, but we - // must pass it to DefFrameProc() too - MSWDefWindowProc(message, wParam, lParam); + // as we don't (usually) resize the MDI client to exactly fit the + // client area (we put it below the toolbar, above statusbar &c), + // we should not pass this one to DefFrameProc break; } @@ -484,7 +482,7 @@ bool wxMDIParentFrame::HandleCommand(WXWORD id, WXWORD cmd, WXHWND hwnd) if ( child->GetHWND() ) { long childId = wxGetWindowId(child->GetHWND()); - if (childId == id) + if (childId == (long)id) { ::SendMessage( GetWinHwnd(GetClientWindow()), WM_MDIACTIVATE, @@ -642,7 +640,7 @@ bool wxMDIChildFrame::Create(wxMDIParentFrame *parent, m_hWnd = (WXHWND)Return; wxWndHook = NULL; - wxWinHandleList->Append((long)GetHWND(), this); + wxAssociateWinWithHandle((HWND) GetHWND(), this); // VZ: what's this? an act of piracy? //SetWindowLong(GetHwnd(), 0, (long)this);