DefWindowProc
函数功能:该函数调用缺省的窗口过程来为应用程序没有处理的任何窗口消息提供缺省的处理。该函数确保每一个消息得到处理。调用DefWindowProc函数时使用窗口过程接收的相同参数。
函数原型:LRESULT DefWindowProc(HWND hWnd,UINT Msg,WPARAM wParam,LPARAM IParam);
参数:
hWnd:指向接收消息的窗口过程的句柄。
Msg:指定消息类型。
wParam:指定其余的、消息特定的信息。该参数的内容与Msg参数值有关。
IParam:指定其余的、消息特定的信息。该参数的内容与Msg参数值有关。
返回值:返回值就是消息处理结果,它与发送的消息有关。
备注:对于Windows CE;如果Msg为WM_SETTEXT那么返回0。
当DefWindowProc处理WM_DESTROY消息时,它不自动调用PostQutMessage。
速查:Windows NT 3.1以上版本;Windows:95以上版本:Windows CE以上版本;头文件;winuser.h;库文件:user32.lib;Unicode:在Windows NT环境中以Unicode和ANSI版本实现。
=============================================================================================================================
DefWindowProc Function
--------------------------------------------------------------------------------
The DefWindowProc function 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 DefWindowProc( HWND hWnd,
UINT Msg,
WPARAM wParam,
LPARAM lParam
);
Parameters
hWnd
[in] Handle to the window procedure that received the message.
Msg
[in] Specifies the message.
wParam
[in] Specifies additional message information. The content of this parameter depends on the value of the Msg parameter.
lParam
[in] Specifies additional message information. The content of this parameter depends on the value of the Msg parameter.
Return Value
The return value is the result of the message processing and depends on the message.
Remarks
Windows 95/98/Me: DefWindowProcW is supported by the Microsoft Layer for Unicode (MSLU). To use this, you must add certain files to your application, as outlined in Microsoft Layer for Unicode on Windows 95/98/Me Systems .
Example
For an example, see Designing a Window Procedure.
Function Information
Minimum DLL Version user32.dll
Header Declared in Winuser.h, include Windows.h
Import library User32.lib
Minimum operating systems Windows 95, Windows NT 3.1
Unicode Implemented as ANSI and Unicode versions
函数原型:LRESULT DefWindowProc(HWND hWnd,UINT Msg,WPARAM wParam,LPARAM IParam);
参数:
hWnd:指向接收消息的窗口过程的句柄。
Msg:指定消息类型。
wParam:指定其余的、消息特定的信息。该参数的内容与Msg参数值有关。
IParam:指定其余的、消息特定的信息。该参数的内容与Msg参数值有关。
返回值:返回值就是消息处理结果,它与发送的消息有关。
备注:对于Windows CE;如果Msg为WM_SETTEXT那么返回0。
当DefWindowProc处理WM_DESTROY消息时,它不自动调用PostQutMessage。
速查:Windows NT 3.1以上版本;Windows:95以上版本:Windows CE以上版本;头文件;winuser.h;库文件:user32.lib;Unicode:在Windows NT环境中以Unicode和ANSI版本实现。
=============================================================================================================================
DefWindowProc Function
--------------------------------------------------------------------------------
The DefWindowProc function 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 DefWindowProc( HWND hWnd,
UINT Msg,
WPARAM wParam,
LPARAM lParam
);
Parameters
hWnd
[in] Handle to the window procedure that received the message.
Msg
[in] Specifies the message.
wParam
[in] Specifies additional message information. The content of this parameter depends on the value of the Msg parameter.
lParam
[in] Specifies additional message information. The content of this parameter depends on the value of the Msg parameter.
Return Value
The return value is the result of the message processing and depends on the message.
Remarks
Windows 95/98/Me: DefWindowProcW is supported by the Microsoft Layer for Unicode (MSLU). To use this, you must add certain files to your application, as outlined in Microsoft Layer for Unicode on Windows 95/98/Me Systems .
Example
For an example, see Designing a Window Procedure.
Function Information
Minimum DLL Version user32.dll
Header Declared in Winuser.h, include Windows.h
Import library User32.lib
Minimum operating systems Windows 95, Windows NT 3.1
Unicode Implemented as ANSI and Unicode versions