Friday, February 22, 2013

WNDCLASS Structure

WNDCLASS Structure:

Typedef Struct
{
 UINT Style;
 WNDPROC IpfnWndProc;
int cbClassExtra;
int cbWndExtra;
HInstance hInstance;
HIcon hIcon;
HCursor hCursor;
HBRUSH hbrBackground;
LPCTSTR LpszMenuName;
LPCTSTR LpszClassName;
} WNDClass, *pWNDClass;

·        The first property of the class is defined as the class style such as CS_HREDRAW, CS_VREDRAW.
·        This set the window procedure for window class to WndProc. This window procedure will process all message to all window.
·        The next fields are reserve some extra space in the class structure and the window structure.
·        HInstance create the instance of the program.
·        HIcon set an icon for all windows created based on this window class.
·        HCursor sets a cursor for all windows.
·        HBRUSH specify the background color of the client area.
·        LpszMenuName specify the window class menu.
·        LpszClassName specify the class name for program.

0 comments:

Post a Comment

Powered by Blogger.