网站首页  词典首页

请输入您要查询的函数:

 

术语 setactivewindow
释义 SetActiveWindow
语法:
HWND SetActiveWindow( HWND hWnd
);
SetActiveWindow函数
该SetActiveWindow函数激活一个窗口。窗口要重视调用线程的消息队列。
参数
hWnd
[in]句柄顶层窗口被激活。
返回值
如果函数成功,返回值是窗口句柄,这是以前的活动。
如果函数失败,返回值为NULL。为了获得更多错误信息,调用GetLastError。
备注
该SetActiveWindow函数激活一个窗口,但如果应用程序是在后台。窗口将纳入前景(上的Z -订购)如果其应用前景是当系统激活的窗口。
如果由hWnd参数确定的窗口是由调用线程创建时,调用线程的活动窗口状态设置为的HWND。否则,调用线程的活动窗口状态设置为NULL。
通过使用AttachThreadInput函数,一个线程可以处理附加的投入到另一个线程。这使得一个线程调用SetActiveWindow激活连接到另一个线程的消息队列一个窗口。
功能信息
最低DLL版本 user32.dll
在Winuser.h中HeaderDeclared,头文件:winuser.h
import libraryUser32.lib
最低操作系统Windows 95,Windows NT 3.1
参见
键盘输入,GetActiveWindow,SetForegroundWindow,WM_ACTIVATE
==英文原文==SetActiveWindow Function
The SetActiveWindow function activates a window. The window must be attached to the calling thread's message queue.
Syntax
HWND SetActiveWindow( HWND hWnd
);
Parameters
hWnd
[in] Handle to the top-level window to be activated.
Return Value
If the function succeeds, the return value is the handle to the window that was previously active.
If the function fails, the return value is NULL. To get extended error information, call GetLastError .
Remarks
The SetActiveWindow function activates a window, but not if the application is in the background. The window will be brought into the foreground (top of Z-Order ) if its application is in the foreground when the system activates the window.
If the window identified by the hWnd parameter was created by the calling thread, the active window status of the calling thread is set to hWnd. Otherwise, the active window status of the calling thread is set to NULL.
By using the AttachThreadInput function, a thread can attach its input processing to another thread. This allows a thread to call SetActiveWindow to activate a window attached to another thread's message queue.
Function Information
Minimum DLL Versionuser32.dll
HeaderDeclared in Winuser.h, include Windows.h
Import libraryUser32.lib
Minimum operating systemsWindows 95, Windows NT 3.1
See Also
Keyboard Input , GetActiveWindow , SetForegroundWindow , WM_ACTIVATE
==原始网址==http://msdn.microsoft.com/en-us/library/ms646311(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:15:29