Help Center

CRichEditCtx.CONSTRUCTORconstructor

Called when a class variable is created.

Windowsconstructordocumented

Syntax

CONSTRUCTOR CRichEditCtx (BYVAL pWindow AS CWindow PTR, BYVAL cID AS LONG_PTR, BYREF wszTitle AS WSTRING = "", BYVAL x AS LONG = 0, BYVAL y AS LONG = 0, BYVAL nWidth AS LONG = 0, BYVAL nHeight AS LONG = 0, BYVAL dwStyle AS DWORD = 0, BYVAL dwExStyle AS DWORD = 0, BYVAL lpParam AS LONG_PTR = 0)

Parameters

NameDescription
pWindowPointer to the parent CWindowclass.
cIDThe control identifier, an integer value used to notify its parent about events. The application determines the control identifier; it must be unique for all controls with the same parent window.
wszTitleOptional. The text of the control.
xOptional. The x-coordinate of the upper-left corner of the window relative to the upper-left corner of the parent window's client area.
yOptional. The initial y-coordinate of the upper-left corner of the window relative to the upper-left corner of the parent window's client area.
nWidthOptional. The width of the control.
nHeightOptional. The height of the control.
dwStyleOptional. The window styles of the control being created.
Default styles: WS_VISIBLE OR WS_CHILD OR WS_TABSTOP OR ES_LEFT OR WS_HSCROLL OR WS_VSCROLL OR ES_AUTOHSCROLL OR ES_AUTOVSCROLL OR ES_MULTILINE OR ES_WANTRETURN OR ES_NOHIDESEL OR ES_SAVESEL
dwExStyleOptional. The extended window styles of the control being created.
Default extended style: WS_EX_CLIENTEDGE
lParamOptional. Pointer to custom data.

Description

Creates an instance of the rich edit control.

Examples

DIM pRichEdit AS CRichEditCtx = CRichEditCtx(@pWindow, IDC_RICHEDIT, _

"Rich Edit box", 100, 50, 300, 200)

DIM pRichEdit AS CRichEditCtx PTR = NEW CRichEditCtx(@pWindow, IDC_RICHEDIT, _

"Rich Edit box", 100, 50, 300, 200)

Reference

  • Defined in AfxNova/CRichEditCtx.inc:569
  • Documented in Windows/WIndows Controls/RichEdit/CRichEditCtx Class.md
  • Topic: CRichEditCtx Class