W
wallacej
I am trying to retrieve a selected value from a listbox and store it in
a string (char[]) variable. I am using the following code:
calibIndex=SendMessage(hWnd,(UINT)IDC_LIST_CALIBOPTS,(WPARAM)0,
LPARAM)0);
SendMessage(hWnd,(UINT)LB_GETTEXT,(WPARAM)calibIndex,(LPARAM)selectedCalib);
Where IDC_LIST_CALIBOPTS is the list and selectedCalib is the variable
where I want the value to go.
This does not work and when I look at the value of selectedCalib it is
"[rvЩ]" and not "Calibration1" as I expected.
Can anybody help?
Thank you
a string (char[]) variable. I am using the following code:
calibIndex=SendMessage(hWnd,(UINT)IDC_LIST_CALIBOPTS,(WPARAM)0,
LPARAM)0);
SendMessage(hWnd,(UINT)LB_GETTEXT,(WPARAM)calibIndex,(LPARAM)selectedCalib);
Where IDC_LIST_CALIBOPTS is the list and selectedCalib is the variable
where I want the value to go.
This does not work and when I look at the value of selectedCalib it is
"[rvЩ]" and not "Calibration1" as I expected.
Can anybody help?
Thank you