网站首页  词典首页

请输入您要查询的函数:

 

术语 sendmessagecallback
释义 SendMessageCallback
语法:
BOOL SendMessageCallback( HWND hWnd,
UINT Msg,
WPARAM wParam,
LPARAM lParam,
SENDASYNCPROC lpCallBack,
ULONG_PTR dwData
);
SendMessageCallback功能
该SendMessageCallback函数指定的消息发送到一个窗口或窗口。它调用指定的窗口和窗口过程立即返回。在窗口过程处理邮件时,系统调用指定的回调函数,并传递邮件的处理和应用的结果定义的值给回调函数。
参数
hWnd
[in]句柄窗口的窗口过程将收到消息。如果此参数为HWND_BROADCAST,该消息被发送到所有顶级的系统级窗口,包括残疾或无形无主窗口,重叠的窗口和弹出窗口,但消息不是发送到子窗口。
消息
[in]指定要发送的信息。
wParam
[in]指定附加消息的特定信息。
lparam的
[in]指定附加消息的特定信息。
lpCallBack
[in]指向一个回调函数,系统调用后,窗口过程处理消息。有关更多信息,请参阅SendAsyncProc。
如果hWnd是HWND_BROADCAST,系统调用回调函数的SendAsyncProc每个顶层窗口一次。
dwData
[in]指定一个应用程序定义的价值被发送到回调函数中指出的lpCallBack参数。
返回值
如果函数成功,返回值为非零。
如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。
备注
如果您要发送以下WM_USER的异步消息函数(PostMessage,SendNotifyMessage和SendMessageCallback)范围内的信息,它的消息参数不能包含指针。否则,操作将失败。该函数将返回之前接收线程有机会来处理信息,发送方将释放内存才能使用。
应用程序需要使用HWND_BROADCAST通信应使用RegisterWindowMessage函数获取间独特的信息,应用程序通信。
该系统不仅为系统消息编组(范围为0至(WM_USER - 1))的项目。其他消息发送(即“= WM_USER)到另一个进程,则必须自定义编组。
回调函数被调用只有在线程调用SendMessageCallback还呼吁GetMessage,PeekMessage,或WaitMessage。
在Windows 95/98/Me:SendMessageCallbackW是支持的Unicode(MSLU)微软层。要使用此,您必须将某些文件到您的应用,概述了对Unicode的Microsoft层在Windows 95/98/Me系统。
功能信息
最低DLL版本 user32.dll
在Winuser.h中HeaderDeclared,头文件:winuser.h
import libraryUser32.lib
最低操作系统Windows 95,Windows NT 3.1
UnicodeImplemented为ANSI和Unicode版本。
参见
消息和消息队列概述,PostMessage,RegisterWindowMessage,SendAsyncProc,SendMessageCallback,SendNotifyMessage
==英文原文==SendMessageCallback Function
The SendMessageCallback function sends the specified message to a window or windows. It calls the window procedure for the specified window and returns immediately. After the window procedure processes the message, the system calls the specified callback function, passing the result of the message processing and an application-defined value to the callback function.
Syntax
BOOL SendMessageCallback( HWND hWnd,
UINT Msg,
WPARAM wParam,
LPARAM lParam,
SENDASYNCPROC lpCallBack,
ULONG_PTR dwData
);
Parameters
hWnd
[in] Handle to the window whose window procedure will receive the message. If this parameter is HWND_BROADCAST, the message is sent to all top-level windows in the system, including disabled or invisible unowned windows, overlapped windows, and pop-up windows; but the message is not sent to child windows.
Msg
[in] Specifies the message to be sent.
wParam
[in] Specifies additional message-specific information.
lParam
[in] Specifies additional message-specific information.
lpCallBack
[in] Pointer to a callback function that the system calls after the window procedure processes the message. For more information, see SendAsyncProc .
If hWnd is HWND_BROADCAST, the system calls the SendAsyncProc callback function once for each top-level window.
dwData
[in] Specifies an application-defined value to be sent to the callback function pointed to by the lpCallBack parameter.
Return Value
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError .
Remarks
If you send a message in the range below WM_USER to the asynchronous message functions ( PostMessage , SendNotifyMessage , and SendMessageCallback), its message parameters cannot include pointers. Otherwise, the operation will fail. The functions will return before the receiving thread has had a chance to process the message and the sender will free the memory before it is used.
Applications that need to communicate using HWND_BROADCAST should use the RegisterWindowMessage function to obtain a unique message for inter-application communication.
The system only does marshalling for system messages (those in the range 0 to (WM_USER-1)). To send other messages (those >= WM_USER) to another process, you must do custom marshalling.
The callback function is called only when the thread that called SendMessageCallback also calls GetMessage , PeekMessage , or WaitMessage .
Windows 95/98/Me: SendMessageCallbackW 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 .
Function Information
Minimum DLL Versionuser32.dll
HeaderDeclared in Winuser.h, include Windows.h
Import libraryUser32.lib
Minimum operating systemsWindows 95, Windows NT 3.1
UnicodeImplemented as ANSI and Unicode versions.
See Also
Messages and Message Queues Overview , PostMessage , RegisterWindowMessage , SendAsyncProc , SendMessageCallback, SendNotifyMessage
==原始网址==http://msdn.microsoft.com/en-us/library/ms644951(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 11:26:43