[User32]
authorJames Tabor <james.tabor@reactos.org>
Tue, 15 Sep 2015 00:15:16 +0000 (00:15 +0000)
committerJames Tabor <james.tabor@reactos.org>
Tue, 15 Sep 2015 00:15:16 +0000 (00:15 +0000)
- Patch by Alex Henrie : Send BM_SETCHECK before WM_CAPTURECHANGED and add tests.

svn path=/trunk/; revision=69233

reactos/win32ss/user/user32/controls/button.c

index 931db98..f4c5959 100644 (file)
@@ -408,7 +408,6 @@ LRESULT WINAPI ButtonWndProc_common(HWND hWnd, UINT uMsg,
             break;
         }
         SendMessageW( hWnd, BM_SETSTATE, FALSE, 0 );
-        ReleaseCapture();
         GetClientRect( hWnd, &rect );
        if (uMsg == WM_KEYUP || PtInRect( &rect, pt ))
         {
@@ -428,6 +427,7 @@ LRESULT WINAPI ButtonWndProc_common(HWND hWnd, UINT uMsg,
             }
             BUTTON_NOTIFY_PARENT(hWnd, BN_CLICKED);
         }
+        ReleaseCapture();
         break;
 
     case WM_CAPTURECHANGED: