win12.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
WinQueryClassName (1.2)
Function Group  Overview                          Up Next Previous
────────────────────────────────────────────────────────────────────────────
 
#define INCL_WINWINDOWMGR
 
SHORT WinQueryClassName(hwnd, cchMax, psz)
HWND hwnd;       /* handle of the window  */
SHORT cchMax;    /* length of the buffer  */
PSZ psz;         /* address of the buffer */
 
The WinQueryClassName function copies the window class name, as a
null-terminated string, into a buffer.
 
If the class name is longer than (cchMax - 1), only the first (cchMax - 1)
characters of the class name are copied.
 
If the specified window is of any of the preregistered WC classes, the class
name returned is in the form #nnnnn, where nnnnn is up to five digits that
correspond to the low word of the WC class-name constant.
 
Parameter  Description
────────────────────────────────────────────────────────────────────────────
 
hwnd       Identifies a window.
 
cchMax     Specifies the length of the buffer pointed to by the psz
           parameter.
 
psz        Points to a buffer for the class name.
 
Return Value
 
The return value is the length of the returned class name, not including the
null termination character.
 
See Also
 
WinQueryClassInfo, WinRegisterClass