GetWindowSubclass function

Retrieves the reference data for the specified window subclass callback.

Syntax

BOOL GetWindowSubclass(
  HWND         hWnd,
  SUBCLASSPROC pfnSubclass,
  UINT_PTR     uIdSubclass,
  DWORD_PTR    *pdwRefData
);

Parameters

hWnd

Type: HWND

The handle of the window being subclassed.

pfnSubclass

Type: SUBCLASSPROC

A pointer to a window procedure. This pointer and the subclass ID uniquely identify this subclass callback.

uIdSubclass

Type: UINT_PTR

UINT_PTR subclass ID. This ID and the callback pointer uniquely identify this subclass callback. Note: On 64-bit versions of Windows this is a 64-bit value.

pdwRefData

Type: DWORD_PTR*

A pointer to a DWORD which will return the reference data. Note: On 64-bit versions of Windows, pointers are 64-bit values.

Return Value

Type: BOOL

Return code Description
TRUE
The subclass callback was successfully installed.
FALSE
The subclass callback was not installed.

Remarks

To use GetWindowSubclass, specify Comctl32.dll version 6 in the manifest. For more information on manifests, see Enabling Visual Styles.

Requirements

   
Windows version Windows XP [desktop apps only] Windows Server 2003 [desktop apps only]
Target Platform Windows
Header commctrl.h
Library Comctl32.lib
DLL Comctl32.dll (version 6.0 or later)

See Also

DefSubclassProc

RemoveWindowSubclass

SetWindowSubclass