comctl32: Handle WM_ENABLE to update disabled style bit and repaint.

This commit is contained in:
Nikolay Sivov 2013-05-10 14:57:39 +04:00 committed by Alexandre Julliard
parent 2dd4e497d6
commit 2620e3cbe0
1 changed files with 15 additions and 1 deletions

View File

@ -1749,6 +1749,19 @@ TRACKBAR_KeyUp (const TRACKBAR_INFO *infoPtr, INT nVirtKey)
}
static LRESULT
TRACKBAR_Enable (TRACKBAR_INFO *infoPtr, BOOL enable)
{
if (enable)
infoPtr->dwStyle &= ~WS_DISABLED;
else
infoPtr->dwStyle |= WS_DISABLED;
InvalidateRect(infoPtr->hwndSelf, &infoPtr->rcThumb, TRUE);
return 1;
}
static LRESULT WINAPI
TRACKBAR_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
@ -1876,7 +1889,8 @@ TRACKBAR_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
case WM_DESTROY:
return TRACKBAR_Destroy (infoPtr);
/* case WM_ENABLE: */
case WM_ENABLE:
return TRACKBAR_Enable (infoPtr, (BOOL)wParam);
case WM_ERASEBKGND:
return 0;