Export (0) Print
Expand All
MFC
Expand Minimize

CRichEditCtrl::SetReadOnly 

Changes the ECO_READONLY option for this CRichEditCtrl object.


BOOL SetReadOnly(
   BOOL bReadOnly = TRUE 
);

Parameters

bReadOnly

Indicates if this CRichEditCtrl object should be read only.

Nonzero if successful; otherwise, 0.

For a brief description of this option, see SetOptions. You can use this function to set all the options for this CRichEditCtrl object.

For more information, see EM_SETREADONLY in the Platform SDK.

// The pointer to my rich edit control.
extern CRichEditCtrl* pmyRichEditCtrl;

// Set the rich edit control to be read-only.
pmyRichEditCtrl->SetReadOnly(TRUE);
ASSERT(pmyRichEditCtrl->GetStyle() & ES_READONLY);

Community Additions

ADD
Show:
© 2014 Microsoft