GetClassInfo

  BOOL GetClassInfo(hinst, lpszClass, lpwc)    
  HANDLE hinst; /* handle of application instance */
  LPCTSTR lpszClass; /* address of class-name string */
  LPWNDCLASS lpwc; /* address of structure for class data */

The GetClassInfo function retrieves information about a window class. This function is used for creating subclasses of a given class.

Parameters

hinst

Identifies the instance of the application that created the class. To retrieve information about classes defined by Windows (such as buttons or list boxes), set this parameter to NULL.

lpszClass

Points to a null-terminated string or is an atom that identifies a string. If this parameter is an atom, it must be a global atom created by a previous call to the GlobalAddAtom function. The atom, a 16-bit value, must be placed in the low-order word of lpszClass; the high-order word must be zero.

The lpszClass string or atom specifies the window class name.

lpwc

Points to a WNDCLASS structure that receives the information about the class. The WNDCLASS structure has the following form:

typedef struct tagWNDCLASS { /* wc */

UINT style;

WNDPROC lpfnWndProc;

int cbClsExtra;

int cbWndExtra;

HANDLE hInstance;

HICON hIcon;

HCURSOR hCursor;

HBRUSH hbrBackground;

LPCTSTR lpszMenuName;

LPCTSTR lpszClassName;

} WNDCLASS;

Return Value

The return value is TRUE if the function found a matching class and successfully copied the data. Otherwise, it is FALSE. Use the GetLastError function to obtain extended error information.

Comments

The GetClassInfo function may be used as either a wide-character function (where text arguments must use Unicode) or an ANSI function (where text arguments must use characters from the Windows 3.x character set installed).

See Also

GetClassLong, GetClassName, GetClassWord, RegisterClass