DefSubclassProc function (commctrl.h)
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.
LRESULT DefSubclassProc( [in] HWND hWnd, [in] UINT uMsg, [in] WPARAM wParam, [in] LPARAM lParam );
A handle to the window being subclassed.
A value of type unsigned int that specifies a window message.
Specifies additional message information. The contents of this parameter depend on the value of the window message.
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.
The returned value is specific to the message sent. This value should be ignored.
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.
|Minimum supported client||Windows XP [desktop apps only]|
|Minimum supported server||Windows Server 2003 [desktop apps only]|
|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)|