Date: 02-16-2022
Return to Index
created by gbSnippets
'CreateWindow creates an overlapped, pop-up, or child window. To use extended window styles
'use the CreateWindowEx Function
'Syntax:
CreateWindowEx (lpClassName, lpWindowName, dwStyle, x,y,nWidth,nHeight,hWndParent,hMenu,hInstance,lpParam)
'Parameters
lpClassName 'pointer to a null-terminated string (any registered name, including predefined system class names).
lpWindowName 'pointer to a null-terminated String (placed in title bar, text of the control, icon name or #identifier)
dwStyle 'style of window
x 'initial horizontal position (upper left screen, except for child is relative to parent window's client area)
y 'initial vertical position (upper left screen, except for child is relative to parent window's client area)
nWidth 'width in device units
nHeight 'height in device units
hWndParent 'handle to parent window (optional for a pop-up window)
'XP: create a msg only window use HWND_MESSAGE
hMenu 'handle to menu or child window ID, depending on the window style. Null if class menu is to be used.
hInstance 'handle to window instance
lpParam 'pointer to CREATESTRUCT structure (lpCreateParams member) pointed to by the lParam param of the WM_CREATE message.
'if MDIClient window, points CLIENTCREATESTRUCT structure, If child window called by MDI Client, points to MDICREATESTRUCT structure.
'NULL If no additional Data is needed.
'Return Value - handle to new window (Null if function fails)
'Remarks
'WM_Create sent when window created. For popup/child, WM_Create, WM_GetMinMaxInfo, WM_NCCreate sent. lParam points to CREATESTRUCT.
'Z-order: bottom for child window, top for top-level Window
'More information on CreateWindw is available at MSDN
http://msdn.microsoft.com/en-us/library/ms632679%28VS.85%29.aspx
'gbs_00382
'Date: 03-10-2012
http://www.garybeene.com/sw/gbsnippets.htm