Windows class

everything in Windows is a window, ie: buttons, scrollbars, text boxes, etc. (they are all derived from a common base class).

 

To create your own window, you must create a window class. To do this define:

 

typedef struct _WNDCLASS

{ UINT            style;                    // style flags

   WNDPROC lpnWndProc;        // ptr to event handler

   int                 cbClsExtra;          // extra bytes

   int                 cbWndExtra;       // extra bytes

   HANDLE     hinstance;            // handle of instance

   HICON         hIcon;                  // handle of icon

   HCURSOR   hCursor;              // handle of cursor

   HBRUSH      hbrBackground;  // handle of background brush

   LPCTSTR     lpszMenuName;  // name of menu

   LPCTSTR     lpszClassName;   // name of class

} WNDCLASS;

 

WNDCLASS       wndclass;  // an instance of a window class