CGXRichEditCtrl::CreateControl
BOOL CreateControl(DWORD dwStyle = ES_MULTILINE, UINT nID = 0);
dwStyle
Specifies the window style for the CrichEditCtrl.
nID
Specifies the control id for the CRichEditCtrl. You may simply pass 0.
Return Value
TRUE if initialization was successful; FALSE if failed.
Remarks
Creates and initializes the CRichEditCtrl window for the cell.
You only need to call this function if you want to change the window's styles for the CRichEditCtrl. If you want to change the window's settings, you should call this function before registering the control in OnInitialUpdate (see the example).
Example
This example shows how to register a CGXRichEditCtrl in the grid and force it to display vertical scrollbars when the text does not fit into the cell area:
void CMyGridView::OnInitialUpdate()
{
// ...
CGXRichEditCtrl* pRTFControl = new CGXRichEditCtrl(this);
pRTFControl->CreateControl(ES_MULTILINE | WS_VSCROLL);
RegisterControl(GX_IDS_CTRL_RICHEDIT, pRTFControl);
// ...
}
See Also
CGXRichEditCtrl::CGXRichEditCtrl