THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 22/02/2005 at 07:33, xxxxxxxx wrote:
Whatever you want the ID to be (as long as the IDs don't collide with those already used in the dialog - must be unique in that sense). I usually start a set of dialog IDs (for gadgets) at a certain number, 4000 or 5000. You can enum-erate them. You can declare a starting number for the ComboBox items (if they are to be variable) and add to that as you add to the list:
ID_CB_BASEITEM 5001
for (each item in list x)
AddItem(SCRIPT_LISTBOX,ID_CB_BASEITEM+x,string[x]);
// or
enum
{
ID_CB_TEXT1 = 5001,
ID_CB_TEXT2,
ID_CB_TEXT3,
// etc.
}
AddItem(SCRIPT_LISTBOX, ID_CB_TEXT1, "Text 1");
AddItem(SCRIPT_LISTBOX, ID_CB_TEXT2, "Text 2");
// etc.
or something similar.
Make sure that you add items after you LoadResource()/AddComboBox(). The ComboBox must exist before you can AddItem()s to it.