Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

nonresponsive combo box 2

Status
Not open for further replies.

LyMc

Programmer
Jun 3, 2003
84
US
I have created a combo box on a dialog, and I'm able to populate the entry area using the SetWindowText API. But I'll be darned if it won't let be populate the selection spaces using SendMessage (window, LB_INSERTSTRING, 0, string); same for LB_ADDSTRING. It does not return an error indication; it simply does nothing. The list count returns zero. Anyone have any ideas?
 
In the resource editor Did you drag down the list display so that at least one item is visible?

I REALLY hope that helps.
Will
 
Thanks, now I can see the drop down list (who'da thunk that?), but I still can't put anything into it. As before, no error, just nothing in the list.
 
For a combo box, you must use CB_... messages instead of LB_...
for example, the value of CB_INSERTSTRING (330, 0x14a) is NOT the same as the value of LB_INSERTSTRING (385, 0x181).

Marcel
 
That did it. Petzold muffed it in this case, or perhaps I missed a warning about that. Thanks for the help, both of you.

Lyle
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top