To give you the best answer we will need to see a bit more of your code...
Generally the way it's done is to have your array of strings as strings[num][maxlen] with your text lines stored there.
Your dialog message handler gives you the handle of the dialog in hit's HWND parameter... so...
char Strings[20][40]; // room for 20 strings of 39 chars each.
// populate list box
void IntList(HWND Dlg, CHAR* Strings, INT Count)
{ for (int x = 0; x < count; x++)
SendDlgItemMessage(Dlg,ID_COMBOBOX, CB_ADDSTRING, 0, (LPARAM) Strings[x]); }
// dialog message tosser
BOOL CALLBACK DlgProc(HWND Dlg, UINT Msg, LPARAM lParm, WPARAM wParm)
{ switch (Msg)
{ case WM_INITDIALOG :
InitList(Dlg,Strings,20);
return 0;
// .... other cases here
}
}
In general, I find it's bad practice to put much code in switch() statements. Instead I write each "case" as a function and call it from the switch. This does two things for you : First, it modularizes your code, making it much easier to maintain. Second, it simplifies the task of troubleshooting a switch() gone wrong.
Anyway... if this doesn't solve your problem for you, post the relevent code (inside code tags, please) and we'll see what we can do...