I am working on a win32 project (visual studio 2012). User Can Enter several markers with their coordinates and names; Now I want to Add all the markers name in the Listbox as a separate item; but with the below code I don't see anything in listbox:
string MarkerNames[10];
CMarkerList *Modeless;
if (!Modeless)
Modeless = new CMarkerList;
if (!::IsWindow(Modeless->GetSafeHwnd()))
Modeless->Create(IDD_DIALOG2,NULL);
Modeless->ShowWindow(SW_SHOW);
HWND hdlg = FindWindow(NULL,_T("Dialog"));
int index1 = SendDlgItemMessage(hdlg, IDC_LIST2, LB_ADDSTRING, 0, (LPARAM)(MarkerNames[0].c_str()));
which Modeless is an object of my dialog and MarkerNames is an array which I saved the marker's name in; if I enter an explicit string such as "TEST" it works but there is a problem with passing parameter to it;
what is the problem and How can I correct that?
thank you so much for your help :)