网站首页  词典首页

请输入您要查询的函数:

 

术语 registershellhookwindow
释义 RegisterShellHookWindow
语法:
BOOL RegisterShellHookWindow( HWND hWnd
);
RegisterShellHookWindow功能
注册一个指定的shell窗口接收事件或通知,壳牌是有用的某些应用的信息。这次活动收到的邮件只发送到壳牌窗口,指定窗口的桌面关联的。邮件的许多都是因为那些可以在调用SetWindowsHookEx函数并指定为吊钩式WH_SHELL收到相同。与RegisterShellHookWindow不同的是,邮件是通过指定的窗口的WindowProc,而不是通过一接到回电过程。
参数
hWnd
[in]的窗口句柄登记壳牌钩消息。
返回值
TRUE,如果函数成功,否则,假。
备注
由于正常的窗口消息,窗口过程的第二个参数标识作为WM_SHELLHOOKMESSAGE消息。然而,对于这些壳钩信息时,信息的价值不是一个预先定义的,如WM_COMMAND消息像其他消息ID不变。该值必须是动态获得通过调用RegisterWindowMessage如下所示:
RegisterWindowMessage(文本(“SHELLHOOK”));
这就排除处理这些邮件时使用传统的交换机声明,要求身份证是在编译时已知的值。壳牌钩处理邮件,通常的做法是代码中的switch语句的默认节如果语句,然后处理消息,如果消息的ID值是一样的RegisterWindowMessage调用获得的值相同。
下表描述了wParam和lParam参数值传递给壳牌挂钩消息的窗口过程。
wParamlParam
HSHELL_GETMINRECTA指针SHELLHOOKINFO结构。
HSHELL_WINDOWACTIVATEDThe HWND句柄激活的窗口。
HSHELL_RUDEAPPACTIVATEDThe HWND句柄激活的窗口。
HSHELL_WINDOWREPLACINGThe HWND句柄的替换顶层窗口。
HSHELL_WINDOWREPLACEDThe HWND句柄的窗口被取代。
HSHELL_WINDOWCREATEDThe HWND句柄正在创建的窗口。
HSHELL_WINDOWDESTROYEDThe HWND句柄的顶层窗口被摧毁。
HSHELL_ACTIVATESHELLWINDOWNot使用。
HSHELL_TASKMANCan被忽略。
HSHELL_REDRAWThe HWND句柄的窗口,需要重新划定。
HSHELL_FLASHThe HWND句柄的需要被闪过窗口。
HSHELL_ENDTASKThe HWND句柄的窗口,应该被迫退出。
HSHELL_APPCOMMANDThe APPCOMMAND一直未处理的申请或其他挂钩。见WM_APPCOMMAND并使用GET_APPCOMMAND_LPARAM宏检索此参数。
虽然您可以通过使用LoadLibrary和GetProcAddress在Microsoft Windows版本相结合,在Windows XP之前这个函数,该函数不使用标准访问包含文件和库之间的联系。头文件包含在Windows XP服务包1(SP1)和Windows Server 2003的文件,这个功能,使其容易使用适当的包含文件和库之间的联系。但是,此函数不供一般使用。我们建议您不要使用新的程序,因为这可能会更改或在Windows的后续版本中不可用。
功能信息
最低DLL版本 user32.dll
在Winuser.h中HeaderDeclared,头文件:winuser.h
import libraryUser32.lib
2000年最低经营systemsWindows
UnicodeImplemented为ANSI和Unicode版本。
参见
视窗概述,DeregisterShellHookWindow,钩子,的WindowProc,ShellProc,WinEvents,发送一条消息
==英文原文==RegisterShellHookWindow Function
Registers a specified Shell window to receive certain messages for events or notifications that are useful to Shell applications. The event messages received are only those sent to the Shell window associated with the specified window's desktop. Many of the messages are the same as those that can be received after calling the SetWindowsHookEx function and specifying WH_SHELL for the hook type. The difference with RegisterShellHookWindow is that the messages are received through the specified window's WindowProc and not through a call back procedure.
Syntax
BOOL RegisterShellHookWindow( HWND hWnd
);
Parameters
hWnd
[in] Handle to the window to register for Shell hook messages.
Return Value
TRUE if the function succeeds; otherwise, FALSE.
Remarks
As with normal window messages, the second parameter of the window procedure identifies the message as a WM_SHELLHOOKMESSAGE. However, for these Shell hook messages, the message value is not a pre-defined constant like other message IDs such as WM_COMMAND . The value must be obtained dynamically using a call to RegisterWindowMessage as shown here:
RegisterWindowMessage(TEXT("SHELLHOOK"));
This precludes handling these messages using a traditional switch statement which requires ID values that are known at compile time. For handling Shell hook messages, the normal practice is to code an If statement in the default section of your switch statement and then handle the message if the value of the message ID is the same as the value obtained from the RegisterWindowMessage call.
The following table describes the wParam and lParam parameter values passed to the window procedure for the Shell hook messages.
wParamlParam
HSHELL_GETMINRECTA pointer to a SHELLHOOKINFO structure.
HSHELL_WINDOWACTIVATEDThe HWND handle of the activated window.
HSHELL_RUDEAPPACTIVATEDThe HWND handle of the activated window.
HSHELL_WINDOWREPLACINGThe HWND handle of the window replacing the top-level window.
HSHELL_WINDOWREPLACEDThe HWND handle of the window being replaced.
HSHELL_WINDOWCREATEDThe HWND handle of the window being created.
HSHELL_WINDOWDESTROYEDThe HWND handle of the top-level window being destroyed.
HSHELL_ACTIVATESHELLWINDOWNot used.
HSHELL_TASKMANCan be ignored.
HSHELL_REDRAWThe HWND handle of the window that needs to be redrawn.
HSHELL_FLASHThe HWND handle of the window that needs to be flashed.
HSHELL_ENDTASKThe HWND handle of the window that should be forced to exit.
HSHELL_APPCOMMANDThe APPCOMMAND which has been unhandled by the application or other hooks. See WM_APPCOMMAND and use the GET_APPCOMMAND_LPARAM macro to retrieve this parameter.
Although you can access this function by using LoadLibrary and GetProcAddress combined in Microsoft Windows versions prior to Windows XP, the function is not accessible using the standard Include file and library linkage. The header files included in Windows XP Service Pack 1 (SP1) and Windows Server 2003 document this function and make it accessible using the appropriate Include file and library linkage. However, this function is not intended for general use. It is recommended that you do not use it in new programs because it might be altered or unavailable in subsequent versions of Windows.
Function Information
Minimum DLL Versionuser32.dll
HeaderDeclared in Winuser.h, include Windows.h
Import libraryUser32.lib
Minimum operating systemsWindows 2000
UnicodeImplemented as ANSI and Unicode versions.
See Also
Windows Overview , DeregisterShellHookWindow , SetWindowsHookEx , WindowProc , ShellProc , WinEvents , Sending a Message
==原始网址==http://msdn.microsoft.com/en-us/library/ms644989(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:30:44