GetClassName

2.x

  int GetClassName(hwnd, lpszClassName, cchClassName)    
  HWND hwnd; /* handle of window, */  
  LPSTR lpszClassName; /* address of buffer for class name */
  int cchClassName; /* size of buffer, */  

The GetClassName function retrieves the class name of a window.

Parameters

hwnd

Identifies the window.

lpszClassName

Points to a buffer that receives the null-terminated class name string.

cchClassName

Specifies the length of the buffer pointed to by the lpszClassName parameter. The class name string is truncated if it is longer than the buffer.

Return Value

The return value is the length, in bytes, of the returned class name, not including the terminating null character. The return value is zero if the specified window handle is invalid.