Handle wParam in WM_PAINT properly
Dimitrie O. Paun
dpaun at rogers.com
Thu Mar 24 18:49:29 CST 2005
ChangeLog
Handle wParam in WM_PAINT properly: if non-null,
it is the hdc we are supposed to use to draw into.
Index: dlls/comctl32/propsheet.c
===================================================================
RCS file: /var/cvs/wine/dlls/comctl32/propsheet.c,v
retrieving revision 1.124
diff -u -r1.124 propsheet.c
--- dlls/comctl32/propsheet.c 24 Mar 2005 21:01:39 -0000 1.124
+++ dlls/comctl32/propsheet.c 25 Mar 2005 00:47:06 -0000
@@ -3077,7 +3077,7 @@
/******************************************************************************
* PROPSHEET_Paint
*/
-static LRESULT PROPSHEET_Paint(HWND hwnd)
+static LRESULT PROPSHEET_Paint(HWND hwnd, HDC hdcParam)
{
PropSheetInfo* psInfo = (PropSheetInfo*) GetPropW(hwnd, PropSheetInfoStr);
PAINTSTRUCT ps;
@@ -3092,7 +3092,7 @@
WCHAR szBuffer[256];
int nLength;
- hdc = BeginPaint(hwnd, &ps);
+ hdc = hdcParam ? hdcParam : BeginPaint(hwnd, &ps);
if (!hdc) return 1;
hdcSrc = CreateCompatibleDC(0);
@@ -3266,7 +3266,7 @@
DeleteDC(hdcSrc);
- EndPaint(hwnd, &ps);
+ if (!hdcParam) EndPaint(hwnd, &ps);
return 0;
}
@@ -3396,7 +3396,7 @@
}
case WM_PAINT:
- PROPSHEET_Paint(hwnd);
+ PROPSHEET_Paint(hwnd, (HDC)wParam);
return TRUE;
case WM_DESTROY:
Index: dlls/comctl32/syslink.c
===================================================================
RCS file: /var/cvs/wine/dlls/comctl32/syslink.c,v
retrieving revision 1.9
diff -u -r1.9 syslink.c
--- dlls/comctl32/syslink.c 2 Mar 2005 13:53:52 -0000 1.9
+++ dlls/comctl32/syslink.c 24 Mar 2005 05:06:40 -0000
@@ -879,13 +879,14 @@
* SYSLINK_Paint
* Handles the WM_PAINT message.
*/
-static LRESULT SYSLINK_Paint (SYSLINK_INFO *infoPtr)
+static LRESULT SYSLINK_Paint (SYSLINK_INFO *infoPtr, HDC hdcParam)
{
HDC hdc;
PAINTSTRUCT ps;
- hdc = BeginPaint (infoPtr->Self, &ps);
+
+ hdc = hdcParam ? hdcParam : BeginPaint (infoPtr->Self, &ps);
SYSLINK_Draw (infoPtr, hdc);
- EndPaint (infoPtr->Self, &ps);
+ if (!hdcParam) EndPaint (infoPtr->Self, &ps);
return 0;
}
@@ -1466,7 +1467,7 @@
switch(message) {
case WM_PAINT:
- return SYSLINK_Paint (infoPtr);
+ return SYSLINK_Paint (infoPtr, (HDC)wParam);
case WM_SETCURSOR:
{
--
Dimi.
More information about the wine-patches
mailing list