views:

24

answers:

1

I'm writing some code and I need to get the window handle of the listbox associated with a combo box. When looking in spy++, it looks like the parent of the listbox is the desktop, not the combo box. How can I programmatically find the listbox window handle?

+2  A: 

Send CB_GETCOMBOBOXINFO to the combo box, and it fills in a COMBOBOXINFO structure, which contains the window handles to the edit control and the list box control.

Jerry Coffin