Hi guys, I have a few problems with dialog boxes. First of all, I call the SendMessage function to add strings to a combo box and when the dialog box is displayed and I try to select it nothing is displayed!!, I'm not sure why this is I performed the following procedure:

1. Use "CreateDialog" to create the dialog box from a resource.
2. Get the hWnd's for the combo boxes by using GetDlgItem
3. Send the appropriate strings to the combo boxes, using CB_ADDSTRING
4. Show the window and set it as foreground
5. Enter message loop (using GetMessage and IsDialogMessage)
Posted on 2004-12-21 22:21:32 by x86asm
Shouldn't you be doing number 2 and 3 in the WM_INITDIALOG?
Posted on 2004-12-22 00:18:15 by roticv
Hi,

Check the return from CB_ADDSTRING to make sure that it is working, it should return the string index (0 based). Also, if it is a drop-down combo be sure that the total height is enough to include both the edit portion and the list box.
Posted on 2004-12-22 00:25:17 by donkey
Shouldn't you be doing number 2 and 3 in the WM_INITDIALOG?

I tried that and for some reason, it still didnt work.
Posted on 2004-12-22 15:44:51 by x86asm