From 02aa9504bce6456726b447f0babc9ed522e19d55 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 5 Jul 2008 20:53:27 +0000 Subject: [PATCH] remove code for drawing icon of minimized window manually, this was only useful under NT 3.51 and earlier among all Win32 systems and I don't think we support that any more git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54499 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/msw/frame.h | 1 - src/msw/frame.cpp | 56 ------------------------------------------ 2 files changed, 57 deletions(-) diff --git a/include/wx/msw/frame.h b/include/wx/msw/frame.h index 5a3fb73624..11e881d5a8 100644 --- a/include/wx/msw/frame.h +++ b/include/wx/msw/frame.h @@ -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); diff --git a/src/msw/frame.cpp b/src/msw/frame.cpp index 917fd8220f..4cf00e18b3 100644 --- a/src/msw/frame.cpp +++ b/src/msw/frame.cpp @@ -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: -- 2.45.2