[PATCH v2 02/10] comctl32/button: Implement BCM_SETDROPDOWNSTATE

Gabriel Ivăncescu gabrielopcode at gmail.com
Wed Apr 3 12:06:25 CDT 2019


Signed-off-by: Gabriel Ivăncescu <gabrielopcode at gmail.com>
---
 dlls/comctl32/button.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/dlls/comctl32/button.c b/dlls/comctl32/button.c
index 0bd416d..38c7d4c 100644
--- a/dlls/comctl32/button.c
+++ b/dlls/comctl32/button.c
@@ -875,6 +875,17 @@ static LRESULT CALLBACK BUTTON_WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, L
         }
         break;
 
+    case BCM_SETDROPDOWNSTATE:
+        new_state = wParam ? BST_DROPDOWNPUSHED : 0;
+
+        if ((infoPtr->state ^ new_state) & BST_DROPDOWNPUSHED)
+        {
+            infoPtr->state &= ~BST_DROPDOWNPUSHED;
+            infoPtr->state |= new_state;
+            InvalidateRect(hWnd, NULL, FALSE);
+        }
+        break;
+
     case BCM_SETTEXTMARGIN:
     {
         RECT *text_margin = (RECT *)lParam;
-- 
2.20.1




More information about the wine-devel mailing list