GetComboBoxInfo Function

Retrieves information about the specified combo box.

Syntax

BOOL GetComboBoxInfo(      
    HWND hwndCombo,     PCOMBOBOXINFO pcbi );

Parameters

hwndCombo
[in] A handle to the combo box.
pcbi
[out] A pointer to a COMBOBOXINFO structure that receives the information. You must set COMBOBOXINFO.cbSize before calling this function.

Return Value

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

Remarks

The CB_GETCOMBOBOXINFO message is equivalent to this function.

Example

The following example code retrieves information about the combo box specified by the window handle.

COMBOBOXINFO info = { sizeof(COMBOBOXINFO) };
GetComboBoxInfo(hwnd, &info);

Function Information

Minimum DLL Versionuser32.dll
HeaderDeclared in Winuser.h, include Windows.h
Import libraryUser32.lib
Minimum operating systems Windows 98, Windows NT 4.0 with Service Pack 6

See Also

Tags :


Community Content

Andrew Micenko
rcButton value incorrect with new Windows themes.
The value that comes back in the COMBOBOXINFO.rcButton is not correct in Windows Vista (and perhaps XP, but I haven't tested) when the new Windows themes are switched on. The rcButton rectangle is one pixel smaller than it should be on all sides. I have noticed this in a control that overrides the OnLButtonDown function as it displays a special dropdown. However, if the user clicks on the border of the button, the default implementation of the combo box dropdown appears - which is always a blank white rectange in my case.
Tags :

Page view tracker