Nov 302007
 

We know that a combobox is a combination of different controls. Well now the question is there an API to get ample information on these controls nested in a combo?  The answer is yes, use GetComboBoxInfo.

Takes a COMBOBOXINFO pointer as parameter and on return will hold necessary information…

Usage:

COMBOBOXINFO CmbInfo = { 0 };
CmbInfo.cbSize = sizeof( CmbInfo );
VERIFY( GetComboBoxInfo( hWndComboHandle, &CmbInfo ));

As a result of this call CmbInfo is going to contain the list control handle, edit control handle and other information pertaining to a combo box.

An equivalent combobox message exists CB_GETCOMBOBOXINFO.