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
This commit is contained in:
@@ -80,7 +80,6 @@ public:
|
|||||||
#endif // wxUSE_MENUS
|
#endif // wxUSE_MENUS
|
||||||
|
|
||||||
// event handlers
|
// event handlers
|
||||||
bool HandlePaint();
|
|
||||||
bool HandleSize(int x, int y, WXUINT flag);
|
bool HandleSize(int x, int y, WXUINT flag);
|
||||||
bool HandleCommand(WXWORD id, WXWORD cmd, WXHWND control);
|
bool HandleCommand(WXWORD id, WXWORD cmd, WXHWND control);
|
||||||
bool HandleMenuSelect(WXWORD nItem, WXWORD nFlags, WXHMENU hMenu);
|
bool HandleMenuSelect(WXWORD nItem, WXWORD nFlags, WXHMENU hMenu);
|
||||||
|
@@ -835,58 +835,6 @@ bool wxFrame::MSWDoTranslateMessage(wxFrame *frame, WXMSG *pMsg)
|
|||||||
// our private (non virtual) message handlers
|
// 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)
|
bool wxFrame::HandleSize(int WXUNUSED(x), int WXUNUSED(y), WXUINT id)
|
||||||
{
|
{
|
||||||
#if !defined(__WXMICROWIN__) && !defined(__WXWINCE__)
|
#if !defined(__WXMICROWIN__) && !defined(__WXWINCE__)
|
||||||
@@ -1079,10 +1027,6 @@ WXLRESULT wxFrame::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lPara
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WM_PAINT:
|
|
||||||
processed = HandlePaint();
|
|
||||||
break;
|
|
||||||
|
|
||||||
#if !defined(__WXMICROWIN__) && !defined(__WXWINCE__)
|
#if !defined(__WXMICROWIN__) && !defined(__WXWINCE__)
|
||||||
#if wxUSE_MENUS
|
#if wxUSE_MENUS
|
||||||
case WM_INITMENUPOPUP:
|
case WM_INITMENUPOPUP:
|
||||||
|
Reference in New Issue
Block a user