Can i create two var. in an CEDitBox, i.e an CString and an CEdit ?
if i use the CSting how can i give the handle to the CEdit?.
Please it's urgent??
Printable View
Can i create two var. in an CEDitBox, i.e an CString and an CEdit ?
if i use the CSting how can i give the handle to the CEdit?.
Please it's urgent??
I assume you are talking about DDX member variables associated with your CEdit.
If thats the case, you can define BOTH a CString and a CEdit member using ClassWizard.
i tried this but i have access to the CString an not to the CEdit
I try to write something with the CString var. and to clear the CEditBox by the CEdit var. there are no effect and debugger wrote {CEdit hWnd = 0x00010478}.
I don't understand what you are trying to do.
> i tried this but i have access to the CString an not to the CEdit
If you added a CEdit member variable using classwizard, you have access to it throughout the scope of your dialog class in the same way as the CString member.
> I try to write something with the CString var.
You mean assign a value to the CString and have it appear in the edit box?
csText = "blah";
UpdateData(FALSE);
- or -
csText = "blah";
m_EditBox.SetWindowText(csText);
> and to clear the CEditBox by the CEdit var
???
m_EditBox.SetWindowText("");
Why not post the code fragment causing the problem...
the problem is solved i need to write before using the CEdit(m_edit) var
*******************
UpdateData(TRUE);
m_edit.Clear;
********************
and not UpdateData(FALSE); after