i have a dialog box that has combo boxes and im wondering how to add things to the comboboxes at runtime. I cant figure out how to use sendmessage to do it because id have to have the hwnd of the combobox right? and i dont know how to get those when dealing with dialog boxes from resource files. any help would be greatly appreciated :)
::SendMessage(hCOmbo,CB_ADDSTRING,0,(LPCTSTR)"string 1");
::SendMessage(hCOmbo,CB_ADDSTRING,0,(LPCTSTR)"string 2");
Other COMBO messages
CB_DELETESTRING
CB_FINDSTRING
CB_GETCURSEL
CB_GETCOUNT
...
From resources into a dialog.
COMBOBOX resource ID is IDC_COMBO
HWND hCombo=::GetDlgItem(hDialog, IDC_COMBO);
//now you have hCombo;