Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

CREATESTRUCT Structure

The CREATESTRUCT structure defines the initialization parameters passed to the window procedure of an application.

typedef struct tagCREATESTRUCT { 
   LPVOID lpCreateParams; 
   HANDLE hInstance; 
   HMENU hMenu; 
   HWND hwndParent; 
   int cy; 
   int cx; 
   int y; 
   int x; 
   LONG style; 
   LPCSTR lpszName; 
   LPCSTR lpszClass; 
   DWORD dwExStyle; 
} CREATESTRUCT;

lpCreateParams

Points to data to be used to create the window.

hInstance

Identifies the module-instance handle of the module that owns the new window.

hMenu

Identifies the menu to be used by the new window. If a child window, contains the integer ID.

hwndParent

Identifies the window that owns the new window. This member is NULL if the new window is a top-level window.

cy

Specifies the height of the new window.

cx

Specifies the width of the new window.

y

Specifies the y-coordinate of the upper left corner of the new window. Coordinates are relative to the parent window if the new window is a child window; otherwise coordinates are relative to the screen origin.

x

Specifies the x-coordinate of the upper left corner of the new window. Coordinates are relative to the parent window if the new window is a child window; otherwise coordinates are relative to the screen origin.

style

Specifies the new window's style.

lpszName

Points to a null-terminated string that specifies the new window's name.

lpszClass

Points to a null-terminated string that specifies the new window's Windows class name (a WNDCLASS structure; for more information, see the Windows SDK).

dwExStyle

Specifies the extended style for the new window.

Header: winuser.h

Community Additions

ADD
Show:
© 2015 Microsoft