GetWindowSubclass function

Retrieves the reference data for the specified window subclass callback.

Syntax


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

Parameters

hWnd [in]

Type: HWND

The handle of the window being subclassed.

pfnSubclass [in]

Type: SUBCLASSPROC

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

uIdSubclass [in]

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 [out]

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 codeDescription
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

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Commctrl.h

Library

Comctl32.lib

DLL

Comctl32.dll (version 6.0 or later)

See also

DefSubclassProc
SetWindowSubclass
RemoveWindowSubclass

 

 

Show: