From 57b5615fc2cab617acfade79c951aa5a041b8acc Mon Sep 17 00:00:00 2001 From: Robert Shearman Date: Wed, 15 Jun 2005 10:23:54 +0000 Subject: [PATCH] Implement GetComboBoxInfo and CB_GETCOMBOBOXINFO. --- dlls/user/combo.c | 26 ++++++++++++++++++++++---- include/winuser.h | 3 +++ 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/dlls/user/combo.c b/dlls/user/combo.c index 0f2cf192f45..108ce99c325 100644 --- a/dlls/user/combo.c +++ b/dlls/user/combo.c @@ -1828,6 +1828,24 @@ static void COMBO_MouseMove( LPHEADCOMBO lphc, WPARAM wParam, LPARAM lParam ) } } +static LRESULT COMBO_GetComboBoxInfo(LPHEADCOMBO lphc, COMBOBOXINFO *pcbi) +{ + if (!pcbi || (pcbi->cbSize < sizeof(COMBOBOXINFO))) + return FALSE; + + pcbi->rcItem = lphc->textRect; + pcbi->rcButton = lphc->buttonRect; + pcbi->stateButton = 0; + if (lphc->wState & CBF_DROPPED) + pcbi->stateButton |= STATE_SYSTEM_PRESSED; + if (IsRectEmpty(&lphc->buttonRect)) + pcbi->stateButton |= STATE_SYSTEM_INVISIBLE; + pcbi->hwndCombo = lphc->self; + pcbi->hwndItem = lphc->hWndEdit; + pcbi->hwndList = lphc->hWndLBox; + return TRUE; +} + static char *strdupA(LPCSTR str) { char *ret; @@ -2281,7 +2299,8 @@ static LRESULT ComboWndProc_common( HWND hwnd, UINT message, case CB_GETEXTENDEDUI16: case CB_GETEXTENDEDUI: return (lphc->wState & CBF_EUI) ? TRUE : FALSE; - + case CB_GETCOMBOBOXINFO: + return COMBO_GetComboBoxInfo(lphc, (COMBOBOXINFO *)lParam); default: if (message >= WM_USER) WARN("unknown msg WM_USER+%04x wp=%04x lp=%08lx\n", @@ -2319,7 +2338,6 @@ static LRESULT WINAPI ComboWndProcW( HWND hwnd, UINT message, WPARAM wParam, LPA BOOL WINAPI GetComboBoxInfo(HWND hwndCombo, /* [in] handle to combo box */ PCOMBOBOXINFO pcbi /* [in/out] combo box information */) { - FIXME("\n"); - return FALSE; - + TRACE("(%p, %p)\n", hwndCombo, pcbi); + return SendMessageW(hwndCombo, CB_GETCOMBOBOXINFO, 0, (LPARAM)pcbi); } diff --git a/include/winuser.h b/include/winuser.h index 27e400c0203..f8e73245880 100644 --- a/include/winuser.h +++ b/include/winuser.h @@ -2344,6 +2344,9 @@ typedef struct tagSCROLLBARINFO #define CB_GETDROPPEDWIDTH 0x015f #define CB_SETDROPPEDWIDTH 0x0160 #define CB_INITSTORAGE 0x0161 +#define CB_MULTIPLEADDSTRING 0x0163 +#define CB_GETCOMBOBOXINFO 0x0164 +#define CB_MSGMAX 0x0165 /* Combo box notification codes */ #define CBN_ERRSPACE (-1)