-
November 18th, 2010, 09:47 AM
#1
[RESOLVED] let the user modify a ComboBox string
Hi people, i'm just starting with vc++ programming and i would like to know if there any way
to let the user modify a combo box list, i mean let them modify strings and also add as many strings as they wish.
If i could read the edit box when the user modify some string my problem would be almost solved.
I've tried using CString m_choice;
m_combobox.GetLBText(m_combobox.GetCurSel(), m_choice);
and of course didn't work, i guess cause doesn't exist and index to my case.
And also tried using m_combobox.SetEditSel(0, -1);
m_combobox.Copy();
that one did work, but i have the string in the clipboard, in CF_TEXT format, wich is not practical.
Any help would be really appreciated, thanks for your time.
-
November 18th, 2010, 10:16 AM
#2
Re: let the user modify a ComboBox string
GetLBText gives you a string from the list box of a combo box.
To get a string from the edit box - use GetWindowText.
Victor Nijegorodov
-
November 18th, 2010, 12:03 PM
#3
Re: let the user modify a ComboBox string
Thanks Victor for your help, with a few words u have solve my problem
Using CString m_choice;
m_combobox.GetWindowText(m_choice);
i've got what i was looking for.
Tags for this Thread
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
|