All,
I have a problem like this:
I use a CString member to exchange data with CEdit using DDX, now I sometimes want the CEdit to be read-only, how can I implement this?
Thanks a lot.
Printable View
All,
I have a problem like this:
I use a CString member to exchange data with CEdit using DDX, now I sometimes want the CEdit to be read-only, how can I implement this?
Thanks a lot.
I found a function "CWnd* GetDlgItem( int nID ) const" which may be used to resolve this problem, do you think so?
Set the Read Only property of the edit box to be TRUE. The DDX/DDV routines work fine even if the edit box is read only.
You can do it this way as well:
Code:CString strText;
GetDlgItem (IDC_TEXT)->GetWindowText (strText);
Err... CEdit::SetReadOnly?