Commit 13ffd58a authored by Sheri Steeves's avatar Sheri Steeves Committed by Alexandre Julliard

Added save and reset of SetBKMode values in WM_PAINT.

Added handling of lParam value in BM_SETSTYLE.
parent ae41e8c8
......@@ -133,8 +133,9 @@ static inline LRESULT WINAPI ButtonWndProc_locked(WND* wndPtr, UINT uMsg,
{
PAINTSTRUCT ps;
HDC hdc = wParam ? (HDC)wParam : BeginPaint( hWnd, &ps );
SetBkMode( hdc, OPAQUE );
int nOldMode = SetBkMode( hdc, OPAQUE );
(btnPaintFunc[style])( wndPtr, hdc, ODA_DRAWENTIRE );
SetBkMode(hdc, nOldMode); /* reset painting mode */
if( !wParam ) EndPaint( hWnd, &ps );
}
break;
......@@ -266,7 +267,11 @@ static inline LRESULT WINAPI ButtonWndProc_locked(WND* wndPtr, UINT uMsg,
wndPtr->dwStyle = (wndPtr->dwStyle & 0xfffffff0)
| (wParam & 0x0000000f);
style = wndPtr->dwStyle & 0x0000000f;
/* Only redraw if lParam flag is set.*/
if (lParam)
PAINT_BUTTON( wndPtr, style, ODA_DRAWENTIRE );
break;
case BM_CLICK:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment