GetComboBoxInfo (user32)
Last changed: -64.29.177.8

.
Summary

C# Signature:

[DllImport("user32.dll")]
static extern bool GetComboBoxInfo(ref COMBOBOXINFO pcbi);

User-Defined Types:

[StructLayout(LayoutKind.Sequential)]
public struct COMBOBOXINFO {
    public Int32 cbSize;
    public RECT rcItem;
    public RECT rcButton;
    public ComboBoxButtonState buttonState;
    public IntPtr hwndCombo;
    public IntPtr hwndEdit;
    public IntPtr hwndList;
}

public enum ComboBoxButtonState {
    STATE_SYSTEM_NONE = 0,
    STATE_SYSTEM_INVISIBLE = 0x00008000,
    STATE_SYSTEM_PRESSED = 0x00000008
}

RECT

Notes:

None.

Tips & Tricks:

Please add some!

Sample Code:

COMBOBOXINFO cbi = new COMBOBOXINFO();
cbi.cbSize = System.Runtime.InteropServices.Marshal.SizeOf(cbi);
if(GetComboBoxInfo(comboBox1.Handle, ref cbi)) {
    if(info.hwndEdit == IntPtr.Zero) {
        throw new Exception("ComboBox must have the DropDown style!");
    }
}

Alternative Managed API:

Do you know one? Please contribute it!

Documentation