DefWindowProc function
Applies to: desktop apps only
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 WINAPI DefWindowProc( __in HWND hWnd, __in UINT Msg, __in WPARAM wParam, __in LPARAM lParam );
Parameters
- hWnd [in]
-
Type: HWND
A handle to the window procedure that received the message.
- Msg [in]
-
Type: UINT
The message.
- wParam [in]
-
Type: WPARAM
Additional message information. The content of this parameter depends on the value of the Msg parameter.
- lParam [in]
-
Type: LPARAM
Additional message information. The content of this parameter depends on the value of the Msg parameter.
Return value
Type:
Type: LRESULT
The return value is the result of the message processing and depends on the message.
Examples
For an example, see Designing a Window Procedure.
Requirements
|
Minimum supported client | Windows 2000 Professional |
|---|---|
|
Minimum supported server | Windows 2000 Server |
|
Header |
|
|
Library |
|
|
DLL |
|
|
Unicode and ANSI names | DefWindowProcW (Unicode) and DefWindowProcA (ANSI) |
See also
- Reference
- CallWindowProc
- DefDlgProc
- WindowProc
- Conceptual
- Window Procedures
Send comments about this topic to Microsoft
Build date: 2/3/2012
[DllImport("user32.dll", CharSet=CharSet.Auto)]
public static extern IntPtr DefWindowProc(IntPtr hWnd, int msg, IntPtr wParam, IntPtr lParam);
- 4/25/2009
- dmex
<DllImport("user32.dll", CharSet:=CharSet.Auto)> Public Shared Function DefWindowProc(ByVal hWnd As IntPtr, ByVal msg As Integer, ByVal wParam As IntPtr, ByVal lParam As IntPtr) As IntPtr
End Function
- 4/25/2009
- dmex
where Messages.WindowMessages is enumeration of all known window messages and is of type Int32 (see http://dzonny.cz/Software/Blog/tabid/93/EntryID/9/language/en-US/Default.aspx)
- 12/18/2007
- Đonny