windowclass api

来源:互联网 发布:关系型数据库有哪些 编辑:程序博客网 时间:2024/05/17 23:33


GetClassInfoEx  检索返回一个class信息

BOOL WINAPI GetClassInfoEx(  __in_opt  HINSTANCE hinst,  __in      LPCTSTR lpszClass,  //class name  __out     LPWNDCLASSEX lpwcx  //指向class Structure);
GetClassLongEx 根据nIndex返回class信息

DWORD WINAPI GetClassLongEx(  __in  HWND hWnd,  __in  int nIndex);


ValueMeaning

GCW_ATOM
-32

Retrieves an ATOM value that uniquely identifies the window class. This is the same atom that the RegisterClassEx function returns.

GCL_CBCLSEXTRA
-20

Retrieves the size, in bytes, of the extra memory associated with the class.

GCL_CBWNDEXTRA
-18

Retrieves the size, in bytes, of the extra window memory associated with each window in the class. For information on how to access this memory, see GetWindowLong.

GCL_HBRBACKGROUND
-10

Retrieves a handle to the background brush associated with the class.

GCL_HCURSOR
-12

Retrieves a handle to the cursor associated with the class.

GCL_HICON
-14

Retrieves a handle to the icon associated with the class.

GCL_HICONSM
-34

Retrieves a handle to the small icon associated with the class.

GCL_HMODULE
-16

Retrieves a handle to the module that registered the class.

GCL_MENUNAME
-8

Retrieves the address of the menu name string. The string identifies the menu resource associated with the class.

GCL_STYLE
-26

Retrieves the window-class style bits.

GCL_WNDPROC
-24

Retrieves the address of the window procedure, or a handle representing the address of the window procedure. You must use the CallWindowProc function to call the window procedure.


GetClassLongPtr()   可用在32至64位,在64位上调用GetclassLong

ULONG_PTR WINAPI GetClassLongPtr(  __in  HWND hWnd,  __in  int nIndex);



GetClassName  返回值是成功复制到缓冲区的字符数,不包括null

int WINAPI GetClassName(  __in   HWND hWnd,  __out  LPTSTR lpClassName,  __in   int nMaxCount);