DefWindowProcA function (winuser.h)

Calls the default window procedure to provide default processing for any window messages that an application does not process. This function ensures that every message is processed. DefWindowProc is called with the same parameters received by the window procedure.

Syntax

LRESULT DefWindowProcA(
  [in] HWND   hWnd,
  [in] UINT   Msg,
  [in] WPARAM wParam,
  [in] LPARAM lParam
);

Parameters

[in] hWnd

Type: HWND

A handle to the window procedure that received the message.

[in] Msg

Type: UINT

The message.

[in] wParam

Type: WPARAM

Additional message information. The content of this parameter depends on the value of the Msg parameter.

[in] lParam

Type: LPARAM

Additional message information. The content of this parameter depends on the value of the Msg parameter.

Return value

Type: LRESULT

The return value is the result of the message processing and depends on the message.

Remarks

Note

The winuser.h header defines DefWindowProc as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Target Platform Windows
Header winuser.h (include Windows.h)
Library User32.lib
DLL User32.dll
API set ext-ms-win-ntuser-window-l1-1-0 (introduced in Windows 8)

See also

CallWindowProc

Conceptual

DefDlgProc

Reference

Window Procedures

WindowProc