Link to home
Start Free TrialLog in
Avatar of scs1
scs1

asked on

Another question on dialog controls

I recently learned how to disable a CButton control prior to opening a modal dialog box with the following code:

CButton *cb = (CButton *)GetDlgItem(IDC_BUTTON);
cb->EnableWindow(FALSE);

I want to do something similar now.  What do I do if I want to make an edit control read only prior to opening the dialog box?
ASKER CERTIFIED SOLUTION
Avatar of dvest
dvest

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of scs1
scs1

ASKER

It did indeed work like a charm!!! Thanks

P.S. where do you find these specifiers such as SetReadOnly??
 If using VC, pull up"help" then "search".  In this case CEdit or edit control is what you should look for.  In the bottom pane look for an entry that says "class members".  You'll access all kinds of great info for that control.  As a bonus, all the standard controls are derived from CWnd, so many CWnd functions are usable on the control as well!

Happy hunting,
David
Avatar of scs1

ASKER

Thanks again