|
-
May 16th, 1999, 11:02 PM
#1
Need your help. Extended Combo Box
I have attached a member variable (int m_iInterval) to my extended Combo Box. The user can choose values in the box. After entering "OK", I display the result in a List Box in my main window. The problem is that this result is '0' if the user has choosen the first value in the extended combo box (20), '1' for the second value of the extended combo box, '2' for the third.....
My code is the following :
if(m_dIntervalDlg.DoModal() == IDOK)
{
//CIntervalDlg m_dIntervalDlg ;//m_dIntervalDlg is a variable declared in the main dlg class
CString stmp;
int Interval;
Interval=m_dIntervalDlg.m_iInterval;
stmp.Format("Timer Interval: %05d \n", Interval);
m_cStatusList.AddString(stmp);
....
How can I display the correct value ?
Thanks a lot.
-
May 17th, 1999, 01:59 AM
#2
Re: Need your help. Extended Combo Box
what you're getting is the *index* of the combo box item the user selected, i assume you want to get the actual display value?
if so, then go to class wiward, delete your existing m_iInterval var. and create a new one but this time select CString as the var. type.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|