一个比较少见,但调试有用的函数

GetClassName Function

 

The GetClassName function retrieves the name of the class to which the specified window belongs.

Syntax

int GetClassName(      

    HWND hWnd,     LPTSTR lpClassName,     int nMaxCount );

Parameters

hWnd
[in] Handle to the window and, indirectly, the class to which the window belongs.
lpClassName
[out] Pointer to the buffer that is to receive the class name string.
nMaxCount
[in] Specifies the length, in TCHAR, of the buffer pointed to by the lpClassName parameter. The class name string is truncated if it is longer than the buffer and is always null-terminated.

Return Value

If the function succeeds, the return value is the number of TCHAR copied to the specified buffer.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

你可能感兴趣的:(一个比较少见,但调试有用的函数)