windows_programming_notes.nbk: Home | Index | Next Page: CreateThread | Previous Page: CreateStreamOnHGlobal


 CREATESTRUCT

The CREATESTRUCT structure defines the initialization parameters passed to the window procedure of an application. These members are identical to the parameters of the CreateWindowEx function.

Syntax

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

Memebers:

Remarks

Windows NT/2000 or later: You should access the data represented by the lpCreateParams member using a pointer that has been declared using the UNALIGNED type, because the pointer may not be DWORD aligned. This is demonstrated in the following code example:

    typedef struct tagMyData { 
    // Define creation data here. 
    } MYDATA; 
    typedef struct tagMyDlgData { 
        SHORT cbExtra; 
        MYDATA myData; 
    } MYDLGDATA, UNALIGNED *PMYDLGDATA; 
    PMYDLGDATA pMyDlgdata = (PMYDLGDATA) (((LPCREATESTRUCT) lParam)->lpCreateParams); 

Requirements


windows_programming_notes.nbk: Home | Index | Next Page: CreateThread | Previous Page: CreateStreamOnHGlobal


Notebook exported on Monday, 7 July 2008, 18:56:50 PM Eastern Daylight Time