CreateWindowEx

From ReliCodia

For a much more complete documentation see: MSDN

HWND CreateWindowEx(
   DWORD dwExStyle,
   LPCTSTR lpClassName,
   LPCTSTR lpWindowName,
   DWORD dwStyle,
   int x,
   int y,
   int nWidth,
   int nHeight,
   HWND hWndParent,
   HMENU hMenu,
   HINSTANCE hInstance,
   LPVOID lpParam
);

Creates a window.

dwExStyle Window Style Ex
lpClassName Name of the class (null-terminated string) or an ATOM returned by RegisterClassEx. It may also be a name of one of the predefined System Classes.
lpWindowName The name of the window. This name will be displayed in a title bar of a window (if it has one), or as text in a control window, a button, check box, static control, etc.
dwStyle Window Style
x The upper-left corner x coordinate of the window's initial position. For and Overlapped Window or Popup Window, x specifies screen coordinates. For Child Window, the coordinate with respect to the parent window's Client Area. The value CW_USEDEFAULT can be used for an overlapped window to let the system position it.
y The y coordinate (analogous to above). Note: if x is set to CW_USEDEFAULT, this parameter is ignored.
nWidth Window width, in device coordinates. If set to CW_USEDEFAULT, the system picks both the width and the height.
nHeight Height of the window. Ignored when nWidth set to CW_USEDEFAULT.
hwndParent Handle to the parent or owner window
hMenu Handle to a menu--NULL if class menu to be used. For a child window (as specified in the style parameter), this is the integer ID of the child window. It is up to the application to assign child IDs, unique among all children of the same window.
hInstance Instance handle of the module (exe or dll) associated with the window.
lParam Pointer to a value passed in CREATESTRUCT in WM_CREATE and WM_NCCREATE. See Creation Messages. For MDI Windows, this should be a pointer to the CLIENTCREATESTRUCT.

Returns Window Handle to the newly created window, or NULL when it fails.

Implementations

CreateWindowEx can be called from Visual basic using the following declaration