CContainedWindow::Create

This method creates a window.

Syntax

HWND Create(HWND hWndParent, RECT& rcPos, LPCTSTR szWindowName = NULL, DWORD dwStyle = WS_CHILD | WS_VISIBLE, DWORD dwExStyle = 0, UINT nID = 0 );

At a Glance

Header file: Atlwin.h
Platforms:
Versions: 2.0 and later
Complete documentation: Visual C++ documentation

Remarks

Windows CE doesn't support stand alone menu bars, so the nID parameter must be set to zero, unless you're using it as a child-window identifier.

Windows CE supports the following two new extended window styles.

WS_EX_NOACTIVATE A top level window created with this style can't be activated. If a child window has this style, tapping it won't cause its top-level parent to be activated. A window that has this style will receive stylus events, but neither it nor its child windows can get the focus.
WS_EX_NOANIMATION A window created with this style doesn't show animated exploding and imploding rectangles, and doesn't have a button on the taskbar.

Windows CE does not support the following dwExStyle flags.

WS_EX_ACCEPTFILES WS_EX_LEFTSCROLLBAR
WS_EX_LEFT WS_EX_MDICHILD
WS_EX_LTRREADING WS_EX_PALETTEWINDOW
WS_EX_NOPARENTNOTIFY WS_EX_RIGHTSCROLLBAR
WS_EX_RIGHT WS_EX_TOOLWINDOW
WS_EX_RTLREADING WS_EX_TOPMOST
WS_EX_APPWINDOW WS_EX_TRANSPARENT

Windows CE does not support the following dwStyle flags.

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

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

See the global function CreateWindow for control styles that Windows CE doesn't support.

See Also

CContainedWindow Overveiw, CContainedWindow Methods