- ::PostMessage((HWND) GetHWND(), WM_SIZE, SIZE_RESTORED, MAKELPARAM(width, height));
-}
-
-bool wxFrame::MSWOnPaint(void)
-{
-#if DEBUG > 1
- wxDebugMsg("wxFrameWnd::OnPaint %d\n", handle);
-#endif
- RECT rect;
- if (GetUpdateRect((HWND) GetHWND(), &rect, FALSE))
- {
- if (m_iconized)
- {
- HICON the_icon;
- if (m_icon.Ok())
- the_icon = (HICON) m_icon.GetHICON();
- if (the_icon == 0)
- the_icon = (HICON) m_defaultIcon;
-
- PAINTSTRUCT ps;
- // Hold a pointer to the dc so long as the OnPaint() message
- // is being processed
- HDC cdc = BeginPaint((HWND) GetHWND(), &ps);
-
- // Erase background before painting or we get white background
- this->MSWDefWindowProc(WM_ICONERASEBKGND,(WORD)ps.hdc,0L);
-
- if (the_icon)
- {
- RECT rect;
- GetClientRect((HWND) GetHWND(), &rect);
- int icon_width = 32;
- int icon_height = 32;
- int icon_x = (int)((rect.right - icon_width)/2);
- int icon_y = (int)((rect.bottom - icon_height)/2);
- DrawIcon(cdc, icon_x, icon_y, the_icon);
- }
-
- EndPaint((HWND) GetHWND(), &ps);
- }
- else
- {
- GetEventHandler()->OldOnPaint();
- }
- return 0;
- }
- return 1;
-}
-
-WXHICON wxFrame::MSWOnQueryDragIcon(void)
-{
- if (m_icon.Ok() && (m_icon.GetHICON() != 0))
- return m_icon.GetHICON();
- else
- return m_defaultIcon;
-}
-
-void wxFrame::MSWOnSize(const int x, const int y, const WXUINT id)
-{
-#if DEBUG > 1
- wxDebugMsg("wxFrameWnd::OnSize %d\n", m_hWnd);
-#endif
- switch (id)
- {
- case SIZEFULLSCREEN:
- case SIZENORMAL:
- m_iconized = FALSE;
- break;
- case SIZEICONIC:
- m_iconized = TRUE;
- break;
- }