|
-
July 7th, 1999, 11:47 PM
#1
How to obtain the string written in the Edit box of a Combo box
Can somebody please tell how I can obtain the string written in the Edit box of a combo box??
Zulfi
-
July 8th, 1999, 12:27 AM
#2
Re: How to obtain the string written in the Edit box of a Combo box
There are a lot of methods for this. Let's anonce only one:
Add a memeber of CEdit type to your edit control. Let's say m_myEdit.
When you want to read the text use this :
CString strName;
m_myEdit.GetWindowText(strName);
Let me know if this helps you.
best regards,
Faby
-
July 8th, 1999, 01:42 AM
#3
Re: How to obtain the string written in the Edit box of a Combo box
Try this:
CString szText;
yourDlg.GetDlgItemText(ID_FOR_YOUR_COMBO, szText)
Petrut Isan <[email protected]>
-
July 9th, 1999, 01:40 AM
#4
Re: How to obtain the string written in the Edit box of a Combo box
Thanks for your help. Actually it was the Edit box of Combo. So I used Class Wizard to create onEditChange function & the I put the following code
GetDlgItem(IDC_FILT_SUB1, szText);
The text box contents were stored in szText.
Thanks.
Zulfi
-
July 9th, 1999, 01:48 AM
#5
Re: How to obtain the string written in the Edit box of a Combo box
Thanks for your help. It worked. I put your code in OnEditChange method which is brought into action if something happens in Edit box. It worked fine.
Zulfi.
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
|