The appearance and behavior of a window are determined by its style, which is the combination of the style established by pszClass and flStyle ORed together. Any of the standard styles WS_* can be used in addition to any class-specific styles that may be defined.
A window is usually created enabled and invisible. For more information on the initial state of a created window, see the list of the standard window styles.
Messages may be received from other processes or threads when this function is called.
This function sends the WM_CREATE message to the window procedure of the window being created.
This function sends the WM_ADJUSTWINDOWPOS message after the WM_CREATE message, and before the window is displayed (if applicable). The values passed are those given to the WinCreateWindow function. If the window has style WS_VISIBLE, the window is created visible.
The WM_SIZE message is not sent by the WinCreateWindow function while the window is being created. Any required size processing can be performed during the processing of the WM_CREATE message.
Because windows are often created with zero height or width and sized later, it is good practice not to perform any size-related processing if the size of the window is zero.
If the WinCreateWindow function is called for a window of class WC_FRAME, the controls specified by are created but not formatted. The frame is formatted when a WM_FORMATFRAME message is received but this is not sent during window creation. To cause the frame to format, either a WM_FORMATFRAME message must be sent, or the window position adjusted using the WinSetWindowPos function call which sends a WM_SIZE message if the position or size is changed.
The only limitation to the size and position specified for a window is the number range allowed for the size and position parameters; that is, an application can create windows that are larger than the screen or that are positioned partially or totally off the screen. However, the user interface for manipulation of window sizes and positions is affected if part or all of the window is off the screen.
It is recommended that part of the title bar be left on the screen, if the window has one, to enable the user to move the window around.
When a WC_MENU window is created with this call, pCtlData is assumed to be a menu template, which is used to create the menu. If pCtlData is NULL, an empty menu is created.