]> git.saurik.com Git - wxWidgets.git/commitdiff
remove code for drawing icon of minimized window manually, this was only useful under...
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 5 Jul 2008 20:53:27 +0000 (20:53 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 5 Jul 2008 20:53:27 +0000 (20:53 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54499 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/msw/frame.h
src/msw/frame.cpp

index 5a3fb736245da39801a0f436552074f4f8c9b261..11e881d5a8d78e56bbea37060e45bd6595745985 100644 (file)
@@ -80,7 +80,6 @@ public:
 #endif // wxUSE_MENUS
 
     // event handlers
-    bool HandlePaint();
     bool HandleSize(int x, int y, WXUINT flag);
     bool HandleCommand(WXWORD id, WXWORD cmd, WXHWND control);
     bool HandleMenuSelect(WXWORD nItem, WXWORD nFlags, WXHMENU hMenu);
index 917fd8220f5a8534c368c2de3f36a5205d4f0492..4cf00e18b3e4e040303c699fb89f529afd9e04ff 100644 (file)
@@ -835,58 +835,6 @@ bool wxFrame::MSWDoTranslateMessage(wxFrame *frame, WXMSG *pMsg)
 // our private (non virtual) message handlers
 // ---------------------------------------------------------------------------
 
-bool wxFrame::HandlePaint()
-{
-    RECT rect;
-    if ( ::GetUpdateRect(GetHwnd(), &rect, FALSE) )
-    {
-#if !defined(__WXMICROWIN__) && !defined(__WXWINCE__)
-        if ( m_iconized )
-        {
-            const wxIcon& icon = GetIcon();
-            HICON hIcon = icon.Ok() ? GetHiconOf(icon)
-                                    : (HICON)GetDefaultIcon();
-
-            // Hold a pointer to the dc so long as the OnPaint() message
-            // is being processed
-            PAINTSTRUCT ps;
-            HDC hdc = ::BeginPaint(GetHwnd(), &ps);
-
-            // Erase background before painting or we get white background
-            MSWDefWindowProc(WM_ICONERASEBKGND, (WXWPARAM)ps.hdc, 0L);
-
-            if ( hIcon )
-            {
-                RECT rect;
-                ::GetClientRect(GetHwnd(), &rect);
-
-                // FIXME: why hardcoded?
-                static const int icon_width = 32;
-                static const int icon_height = 32;
-
-                int icon_x = (int)((rect.right - icon_width)/2);
-                int icon_y = (int)((rect.bottom - icon_height)/2);
-
-                ::DrawIcon(hdc, icon_x, icon_y, hIcon);
-            }
-
-            ::EndPaint(GetHwnd(), &ps);
-
-            return true;
-        }
-        else
- #endif
-        {
-            return wxWindow::HandlePaint();
-        }
-    }
-    else
-    {
-        // nothing to paint - processed
-        return true;
-    }
-}
-
 bool wxFrame::HandleSize(int WXUNUSED(x), int WXUNUSED(y), WXUINT id)
 {
 #if !defined(__WXMICROWIN__) && !defined(__WXWINCE__)
@@ -1079,10 +1027,6 @@ WXLRESULT wxFrame::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lPara
             }
             break;
 
-        case WM_PAINT:
-            processed = HandlePaint();
-            break;
-
 #if !defined(__WXMICROWIN__) && !defined(__WXWINCE__)
 #if wxUSE_MENUS
         case WM_INITMENUPOPUP: