网站首页  词典首页

请输入您要查询的函数:

 

术语 sendnotifymessage
释义 SendNotifyMessage
语法:
BOOL SendNotifyMessage( HWND hWnd,
UINT Msg,
WPARAM wParam,
LPARAM lParam
);
SendNotifyMessage功能
该SendNotifyMessage函数指定的消息发送到一个窗口或窗口。如果窗口是由调用线程创建,SendNotifyMessage呼吁为窗口的窗口过程并不会返回,直到窗口程序处理的信息。如果窗口是由不同的线程创建,SendNotifyMessage传递到窗口过程并立即返回,它不为窗口等待程序完成处理该邮件。
参数
hWnd
[in]句柄窗口的窗口过程将收到消息。如果此参数为HWND_BROADCAST,该消息被发送到所有顶级的系统级窗口,包括残疾或无形无主窗口,重叠的窗口和弹出窗口,但消息不是发送到子窗口。
消息
[in]指定要发送的信息。
wParam
[in]指定附加消息的特定信息。
lparam的
[in]指定附加消息的特定信息。
返回值
如果函数成功,返回值为非零。
如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。
备注
如果您要发送以下WM_USER的异步消息函数(PostMessage,SendNotifyMessage和SendMessageCallback)范围内的信息,它的消息参数不能包含指针。否则,操作将失败。该函数将返回之前接收线程有机会来处理信息,发送方将释放内存才能使用。
应用程序需要使用HWND_BROADCAST通信应使用RegisterWindowMessage函数获取间独特的信息,应用程序通信。
该系统不仅为系统消息编组(范围为0至(WM_USER - 1))的项目。其他消息发送(即“= WM_USER)到另一个进程,则必须自定义编组。
在Windows 95/98/Me:SendNotifyMessageW是支持的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,PostThreadMessage,RegisterWindowMessage,SendMessage消息,SendMessageCallback,SendNotifyMessage
==英文原文==SendNotifyMessage Function
The SendNotifyMessage function sends the specified message to a window or windows. If the window was created by the calling thread, SendNotifyMessage calls the window procedure for the window and does not return until the window procedure has processed the message. If the window was created by a different thread, SendNotifyMessage passes the message to the window procedure and returns immediately; it does not wait for the window procedure to finish processing the message.
Syntax
BOOL SendNotifyMessage( HWND hWnd,
UINT Msg,
WPARAM wParam,
LPARAM lParam
);
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.
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.
Windows 95/98/Me: SendNotifyMessageW 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 , PostThreadMessage , RegisterWindowMessage , SendMessage , SendMessageCallback , SendNotifyMessage
==原始网址==http://msdn.microsoft.com/en-us/library/ms644953(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 13:19:49