Handle WM_PRINTCLIENT.

Don't use SelectClipRgn in WM_PRINTCLIENT.
This commit is contained in:
Michael Kaufmann 2005-11-08 12:52:35 +00:00 committed by Alexandre Julliard
parent 2e9bff702c
commit e9310da57b
21 changed files with 25 additions and 14 deletions

View File

@ -899,6 +899,7 @@ static LRESULT WINAPI ANIMATE_WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LP
case WM_TIMER:
return ANIMATE_Timer(infoPtr);
case WM_PRINTCLIENT:
case WM_PAINT:
{
/* the animation isn't playing, or has not decompressed

View File

@ -1284,6 +1284,7 @@ DATETIME_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
case WM_GETDLGCODE:
return DLGC_WANTARROWS | DLGC_WANTCHARS;
case WM_PRINTCLIENT:
case WM_PAINT:
return DATETIME_Paint (infoPtr, (HDC)wParam);

View File

@ -1717,6 +1717,7 @@ HEADER_WindowProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
case WM_THEMECHANGED:
return HEADER_ThemeChanged (hwnd);
case WM_PRINTCLIENT:
case WM_PAINT:
return HEADER_Paint (hwnd, wParam);

View File

@ -516,6 +516,7 @@ HOTKEY_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
case WM_NCCREATE:
return HOTKEY_NCCreate (hwnd, (LPCREATESTRUCTW)lParam);
case WM_PRINTCLIENT:
case WM_PAINT:
HOTKEY_Paint(infoPtr, (HDC)wParam);
return 0;

View File

@ -2007,6 +2007,7 @@ MONTHCAL_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
case WM_LBUTTONUP:
return MONTHCAL_LButtonUp(infoPtr, lParam);
case WM_PRINTCLIENT:
case WM_PAINT:
return MONTHCAL_Paint(infoPtr, wParam);

View File

@ -34,6 +34,8 @@
* PGS_DRAGNDROP
* Notifications:
* PGN_HOTITEMCHANGE
* Messages:
* WM_PRINT and/or WM_PRINTCLIENT
*
* TESTING:
* Tested primarily with the controlspy Pager application.

View File

@ -627,6 +627,7 @@ static LRESULT WINAPI ProgressWindowProc(HWND hwnd, UINT message,
case WM_SETFONT:
return (LRESULT)PROGRESS_SetFont(infoPtr, (HFONT)wParam, (BOOL)lParam);
case WM_PRINTCLIENT:
case WM_PAINT:
return PROGRESS_Paint (infoPtr, (HDC)wParam);

View File

@ -3455,6 +3455,7 @@ PROPSHEET_DialogProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
return TRUE;
}
case WM_PRINTCLIENT:
case WM_PAINT:
PROPSHEET_Paint(hwnd, (HDC)wParam);
return TRUE;

View File

@ -50,7 +50,6 @@
* - WM_LBUTTONDBLCLK
* - WM_MEASUREITEM
* - WM_PALETTECHANGED
* - WM_PRINTCLIENT
* - WM_QUERYNEWPALETTE
* - WM_RBUTTONDOWN
* - WM_RBUTTONUP
@ -4768,11 +4767,11 @@ REBAR_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
case WM_NOTIFYFORMAT:
return REBAR_NotifyFormat (infoPtr, wParam, lParam);
case WM_PRINTCLIENT:
case WM_PAINT:
return REBAR_Paint (infoPtr, wParam, lParam);
/* case WM_PALETTECHANGED: supported according to ControlSpy */
/* case WM_PRINTCLIENT: supported according to ControlSpy */
/* case WM_QUERYNEWPALETTE:supported according to ControlSpy */
/* case WM_RBUTTONDOWN: supported according to ControlSpy */
/* case WM_RBUTTONUP: supported according to ControlSpy */

View File

@ -1342,6 +1342,7 @@ StatusWindowProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
case WM_NOTIFYFORMAT:
return STATUSBAR_NotifyFormat(infoPtr, (HWND)wParam, (INT)lParam);
case WM_PRINTCLIENT:
case WM_PAINT:
return STATUSBAR_WMPaint (infoPtr, (HDC)wParam);

View File

@ -1463,6 +1463,7 @@ static LRESULT WINAPI SysLinkWindowProc(HWND hwnd, UINT message,
return DefWindowProcW( hwnd, message, wParam, lParam );
switch(message) {
case WM_PRINTCLIENT:
case WM_PAINT:
return SYSLINK_Paint (infoPtr, (HDC)wParam);

View File

@ -3283,6 +3283,7 @@ TAB_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
case WM_MOUSEMOVE:
return TAB_MouseMove (infoPtr, wParam, lParam);
case WM_PRINTCLIENT:
case WM_PAINT:
return TAB_Paint (infoPtr, (HDC)wParam);

View File

@ -7234,6 +7234,7 @@ ToolbarWindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
case WM_NOTIFYFORMAT:
return TOOLBAR_NotifyFormat (infoPtr, wParam, lParam);
case WM_PRINTCLIENT:
case WM_PAINT:
return TOOLBAR_Paint (hwnd, wParam);

View File

@ -2782,6 +2782,7 @@ TOOLTIPS_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
case WM_NOTIFYFORMAT:
return TOOLTIPS_NotifyFormat (hwnd, wParam, lParam);
case WM_PRINTCLIENT:
case WM_PAINT:
return TOOLTIPS_Paint (hwnd, wParam, lParam);

View File

@ -1878,6 +1878,7 @@ TRACKBAR_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
case WM_MOUSEMOVE:
return TRACKBAR_MouseMove (infoPtr, wParam, (SHORT)LOWORD(lParam), (SHORT)HIWORD(lParam));
case WM_PRINTCLIENT:
case WM_PAINT:
return TRACKBAR_Paint (infoPtr, (HDC)wParam);

View File

@ -5629,11 +5629,10 @@ TREEVIEW_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
case WM_NOTIFYFORMAT:
return TREEVIEW_NotifyFormat(infoPtr, (HWND)wParam, (UINT)lParam);
case WM_PRINTCLIENT:
case WM_PAINT:
return TREEVIEW_Paint(infoPtr, wParam);
/* WM_PRINTCLIENT */
case WM_RBUTTONDOWN:
return TREEVIEW_RButtonDown(infoPtr, lParam);

View File

@ -934,6 +934,7 @@ static LRESULT WINAPI UpDownWindowProc(HWND hwnd, UINT message, WPARAM wParam, L
return UPDOWN_KeyPressed(infoPtr, (int)wParam);
break;
case WM_PRINTCLIENT:
case WM_PAINT:
return UPDOWN_Paint (infoPtr, (HDC)wParam);

View File

@ -279,6 +279,7 @@ static LRESULT WINAPI ButtonWndProc_common(HWND hWnd, UINT uMsg,
}
return 1;
case WM_PRINTCLIENT:
case WM_PAINT:
if (btnPaintFunc[btn_type])
{
@ -777,7 +778,6 @@ static void PB_Paint( HWND hwnd, HDC hDC, UINT action )
{
RECT rc, focus_rect, r;
UINT dtFlags, uState;
HRGN hRgn;
HPEN hOldPen;
HBRUSH hOldBrush;
INT oldBkMode;
@ -834,16 +834,13 @@ static void PB_Paint( HWND hwnd, HDC hDC, UINT action )
if (pushedState)
OffsetRect(&r, 1, 1);
hRgn = CreateRectRgn(rc.left, rc.top, rc.right, rc.bottom);
SelectClipRgn(hDC, hRgn);
IntersectClipRect(hDC, rc.left, rc.top, rc.right, rc.bottom);
oldTxtColor = SetTextColor( hDC, GetSysColor(COLOR_BTNTEXT) );
BUTTON_DrawLabel(hwnd, hDC, dtFlags, &r);
SetTextColor( hDC, oldTxtColor );
SelectClipRgn(hDC, 0);
DeleteObject(hRgn);
if (state & BUTTON_HASFOCUS)
{
@ -868,7 +865,6 @@ static void CB_Paint( HWND hwnd, HDC hDC, UINT action )
HBRUSH hBrush;
int delta;
UINT dtFlags;
HRGN hRgn;
HFONT hFont;
LONG state = get_button_state( hwnd );
LONG style = GetWindowLongW( hwnd, GWL_STYLE );
@ -970,9 +966,8 @@ static void CB_Paint( HWND hwnd, HDC hDC, UINT action )
if (dtFlags == (UINT)-1L) /* Noting to draw */
return;
hRgn = CreateRectRgn(client.left, client.top, client.right, client.bottom);
SelectClipRgn(hDC, hRgn);
DeleteObject(hRgn);
IntersectClipRect(hDC, client.left, client.top, client.right, client.bottom);
if (action == ODA_DRAWENTIRE)
BUTTON_DrawLabel(hwnd, hDC, dtFlags, &rtext);
@ -986,7 +981,6 @@ static void CB_Paint( HWND hwnd, HDC hDC, UINT action )
IntersectRect(&rtext, &rtext, &client);
DrawFocusRect( hDC, &rtext );
}
SelectClipRgn(hDC, 0);
}

View File

@ -920,6 +920,7 @@ static LRESULT WINAPI EditWndProc_common( HWND hwnd, UINT msg,
result = EDIT_WM_MouseMove(es, (short)LOWORD(lParam), (short)HIWORD(lParam));
break;
case WM_PRINTCLIENT:
case WM_PAINT:
EDIT_WM_Paint(es, (HDC)wParam);
break;

View File

@ -3013,6 +3013,7 @@ static LRESULT WINAPI ListBoxWndProc_common( HWND hwnd, UINT msg,
case WM_GETDLGCODE:
return DLGC_WANTARROWS | DLGC_WANTCHARS;
case WM_PRINTCLIENT:
case WM_PAINT:
{
PAINTSTRUCT ps;

View File

@ -282,6 +282,7 @@ static LRESULT StaticWndProc_common( HWND hwnd, UINT uMsg, WPARAM wParam,
else return unicode ? DefWindowProcW(hwnd, uMsg, wParam, lParam) :
DefWindowProcA(hwnd, uMsg, wParam, lParam);
case WM_PRINTCLIENT:
case WM_PAINT:
{
PAINTSTRUCT ps;