combo - implement GetComboBoxInfo

Steven Edwards steven_ed4153 at yahoo.com
Tue Mar 15 13:11:28 CST 2005


Hi,

--- Alexandre Julliard <julliard at winehq.org> wrote:
> The IsWindow check is useless, what you need is to verify that it's
> really a combobox. The right way to do that is probably to send a
> CB_GETCOMBOBOXINFO message instead.

How about something like this instead?

Index: dlls/user/combo.c
===================================================================
RCS file: /home/wine/wine/dlls/user/combo.c,v
retrieving revision 1.8
diff -u -r1.8 combo.c
--- dlls/user/combo.c   23 Dec 2004 17:21:05 -0000   1.8
+++ dlls/user/combo.c   15 Mar 2005 19:09:52 -0000
@@ -27,7 +27,6 @@
  * If you discover missing features, or bugs, please note them below.
  * 
  * TODO:
- *   - GetComboBoxInfo()
  *   - ComboBox_[GS]etMinVisible()
  *   - CB_GETCOMBOBOXINFO
  *   - CB_GETMINVISIBLE, CB_SETMINVISIBLE
@@ -2293,10 +2292,27 @@
 /*************************************************************************
  *           GetComboBoxInfo   (USER32.@)
  */
-BOOL WINAPI GetComboBoxInfo(HWND hwndCombo,      /* [in] handle to combo box */
-             PCOMBOBOXINFO pcbi   /* [in/out] combo box information */)
-{
-    FIXME("\n");
-    return FALSE;
-
+BOOL WINAPI
+GetComboBoxInfo(HWND hwndCombo,      /* [in] handle to combo box */
+                PCOMBOBOXINFO pcbi   /* [in/out] combo box information */)
+{
+    static const WCHAR ComboBoxW[] = { 'C', 'o', 'm', 'b', 'o', 'B', 'o', 'x', 0 };
+    CHAR szBuffer[MAX_PATH + 1];
+    int dwSize;
+    LPHEADCOMBO lphc;
+  
+    dwSize = GetClassNameW(hwndCombo, szBuffer, sizeof(szBuffer)/sizeof(szBuffer[0])-1);
+ 
+    if (lstrcmpiW(szBuffer, ComboBoxW) != 0)
+        return FALSE;
+ 
+    lphc = (LPHEADCOMBO)GetWindowLongPtrW( hwndCombo, 0 );
+ 
+    pcbi->hwndCombo   = hwndCombo;
+    pcbi->hwndList    = lphc->hWndLBox;
+    pcbi->hwndItem    = lphc->hWndEdit;
+    pcbi->rcItem      = lphc->textRect;
+    pcbi->rcButton    = lphc->buttonRect;
+    pcbi->stateButton = lphc->wState;
+    return TRUE;
 }




		
__________________________________ 
Do you Yahoo!? 
Read only the mail you want - Yahoo! Mail SpamGuard. 
http://promotions.yahoo.com/new_mail 



More information about the wine-devel mailing list