mirror of
https://github.com/reactos/wine.git
synced 2024-11-28 14:10:32 +00:00
WM_PAINT(wParam) might be a valid HDC.
This commit is contained in:
parent
4d1d5fd353
commit
03ca764005
@ -1428,12 +1428,16 @@ static LRESULT WINAPI ScrollBarWndProc( HWND hwnd, UINT message, WPARAM wParam,
|
||||
case WM_PAINT:
|
||||
{
|
||||
PAINTSTRUCT ps;
|
||||
HDC hdc = BeginPaint( hwnd, &ps );
|
||||
HDC hdc = wParam ? (HDC)wParam : BeginPaint(hwnd, &ps);
|
||||
if (GetWindowLongW( hwnd, GWL_STYLE ) & SBS_SIZEBOX)
|
||||
FillRect( hdc, &ps.rcPaint, GetSysColorBrush(COLOR_SCROLLBAR) );
|
||||
{
|
||||
RECT rc;
|
||||
GetClientRect( hwnd, &rc );
|
||||
FillRect( hdc, &rc, GetSysColorBrush(COLOR_SCROLLBAR) );
|
||||
}
|
||||
else
|
||||
SCROLL_DrawScrollBar( hwnd, hdc, SB_CTL, TRUE, TRUE );
|
||||
EndPaint( hwnd, &ps );
|
||||
if (!wParam) EndPaint(hwnd, &ps);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -252,10 +252,10 @@ static LRESULT StaticWndProc_common( HWND hwnd, UINT uMsg, WPARAM wParam,
|
||||
case WM_PAINT:
|
||||
{
|
||||
PAINTSTRUCT ps;
|
||||
BeginPaint(hwnd, &ps);
|
||||
HDC hdc = wParam ? (HDC)wParam : BeginPaint(hwnd, &ps);
|
||||
if (staticPaintFunc[style])
|
||||
(staticPaintFunc[style])( hwnd, ps.hdc, full_style );
|
||||
EndPaint(hwnd, &ps);
|
||||
(staticPaintFunc[style])( hwnd, hdc, full_style );
|
||||
if (!wParam) EndPaint(hwnd, &ps);
|
||||
}
|
||||
break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user