Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Calls the next handler in a window's subclass chain. The last handler in the subclass chain calls the original window procedure for the window.
Syntax
LRESULT DefSubclassProc(
[in] HWND hWnd,
[in] UINT uMsg,
[in] WPARAM wParam,
[in] LPARAM lParam
);
Parameters
[in] hWnd
Type: HWND
A handle to the window being subclassed.
[in] uMsg
Type: UINT
A value of type unsigned int that specifies a window message.
[in] wParam
Type: WPARAM
Specifies additional message information. The contents of this parameter depend on the value of the window message.
[in] lParam
Type: LPARAM
Specifies additional message information. The contents of this parameter depend on the value of the window message. Note: On 64-bit versions of Windows LPARAM is a 64-bit value.
Return value
Type: LRESULT
The returned value is specific to the message sent. This value should be ignored.
Remarks
You do not need to call the default window procedure; this function calls it automatically.
The SUBCLASS module defines helper functions that are used to subclass windows. The code maintains a single property on the subclassed window and dispatches various subclass callbacks to its clients as required. The client is provided reference data and a default processing API.
A subclass callback is identified by a unique pairing of a callback function pointer and an unsigned ID value. Each callback can also store a single DWORD of reference data, which is passed to the callback function when it is called to filter messages. No reference counting is performed for the callback; it may repeatedly call SetWindowSubclass to alter the value of its reference data element.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | commctrl.h |
Library | Comctl32.lib |
DLL | Comctl32.dll (version 5.8 or later) |
API set | ext-ms-win-shell-comctl32-window-l1-1-0 (introduced in Windows 10, version 10.0.14393) |