Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
BOOLSetReadOnly(BOOLbReadOnly**=TRUE);**
Return Value
Nonzero if the operation is successful, or 0 if an error occurs.
Parameters
bReadOnly
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.
Remarks
Calls this function to set the read-only state of an edit control.
The current setting can be found by testing the ES_READONLY flag in the return value of CWnd::GetStyle.
For more information, see in the Win32 documentation.
Example
// The pointer to my edit.
extern CEdit* pmyEdit;
// Set the edit control to be read-only.
pmyEdit->SetReadOnly(TRUE);
ASSERT(pmyEdit->GetStyle() & ES_READONLY);
CEdit Overview | Class Members | Hierarchy Chart
See Also CWnd::GetStyle