CWnd::Create

This method creates a Windows CE child window and attach it to the CWnd object.

At a Glance

Header file: Afxwin.h
Platforms: H/PC 2.0, Palm-size PC, H/PC Pro
Windows CE versions: 1.0 and later
Complete documentation: Visual C++ documentation

Syntax

virtual BOOL Create ( LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL );

Remarks

All windows in Windows CE have the WS_CLIPSIBLINGS and WS_CLIPCHILDREN styles.

The dwStyle parameter can contain a combination of the window styles and control styles. For more information about the styles that Windows CE supports see the Windows and Control Styles chapter of the Windows CE SDK Guide.

Windows CE does not support the following flags for the dwStyle parameter:

Unsupported window styles

WS_CHILDWINDOW WS_ICONIC
WS_MAXIMIZE WS_MAXIMIZEBOX
WS_MINIMIZE WS_MINIMIZEBOX
WS_OVERLAPPEDWINDOW WS_POPUPWINDOW
WS_SIZEBOX WS_THICKFRAME
WS_TILED WS_TILEDWINDOW

Unsupported dialog box styles

DS_ABSALIGN DS_NOFAILCREATE
DS_CENTERMOUSE DS_NOIDLEMSG
DS_CONTEXTHELP DS_SYSMODAL
DS_FIXEDSYS  

Unsupported button styles

BS_BITMAP BS_PUSHBOX
BS_ICON BS_TEXT
BS_LEFTTEXT BS_USERBUTTON (Use BS_OWNERDRAW instead.)
BS_MULTILINE  

Unsupported scroll bar styles

SBS_BOTTOMALIGN
SBS_RIGHTALIGN
SBS_SIZEBOXBOTTOMRIGHTALIGN
SBS_SIZEGRIP

Unsupported static control styles

SS_BLACKFRAME SS_OWNERDRAW
SS_BLACKRECT SS_RIGHTIMAGE
SS_ENHMETAFILE SS_SIMPLE
SS_GRAYFRAME SS_WHITEFRAME
SS_GRAYRECT SS_WHITERECT
SS_METAPICT  

Unsupported combo box styles

CBS_OWNERDRAWFIXED
CBS_OWNERDRAWVARIABLE
CBS_SIMPLE

Unsupported list box styles

LBS_NODATA
LBS_OWNERDRAWFIXED
LBS_OWNERDRAWVARIABLE
LBS_STANDARD

For information about supported window styles, see the Windows and Control Styles chapter of the Windows CE SDK Guide.

See Also

CWnd::CWnd, CWnd::CreateEx