WinQueryClassInfo
Appearance
This function returns window class information.
Syntax
WinQueryClassInfo(hab, PSZClassName, PclsiClassInfo)
Parameters
- hab (HAB) - input
- Anchor-block handle.
- PSZClassName (PSZ) - input
- Class name.
- PclsiClassInfo (PCLASSINFO) - output
- Class information structure.
Returns
- rc (BOOL) - returns
- Class-exists indicator.
- TRUE
- Class does exist
- FALSE
- Class does not exist.
Errors
Possible returns from WinGetLastError
- PMERR_INVALID_INTEGER_ATOM (0x1016)
The specified atom is not a valid integer atom.
- PMERR_INVALID_ATOM_NAME (0x1015)
An invalid atom name string was passed.
- PMERR_ATOM_NAME_NOT_FOUND (0x1017)
The specified atom name is not in the atom table.
Remarks
PSZClassName is either an application-specified name (as defined by the WinRegisterClass call) or the name of a preregistered WC_* class; Preregistered class names are of the form #nnnnn, where nnnnn is up to five digits corresponding to the value of the WC_* class name constant.
This function provides information that is needed to create a subclass of a given class (see WinSubclassWindow).
Example Code
This example obtains a pointer to the window procedure of the window class WC_COMBOBOX.
#define INCL_WINWINDOWMGR #define INCL_WINENTRYFIELDS #include <OS2.H> HAB hab; CLASSINFO classinfo; PFNWP pWindowProc; WinQueryClassInfo(hab, WC_COMBOBOX, &classinfo); pWindowProc = classinfo.pfnWindowProc;
Definition
#define INCL_WINWINDOWMGR /* Or use INCL_WIN, INCL_PM, */ #include <os2.h> HAB hab; /* Anchor-block handle. */ PSZ PSZClassName; /* Class name. */ PCLASSINFO PclsiClassInfo; /* Class information structure. */ BOOL rc; /* Class-exists indicator. */ rc = WinQueryClassInfo(hab, PSZClassName, PclsiClassInfo);