visual-c++mfcvisual-c++-6cedit

How can I get and set the 'read-only' property of an edit box?


How can I get and set the 'read-only' property of an edit box?


Solution

  • The CEdit class has a SetReadOnly method which can be called at run-time. Latest documentation is here.

    To quote:

    Specifies whether to set or remove the read-only state of the edit control. A value of TRUE sets the state to read-only; a value of FALSE sets the state to read/write.