將視窗提到最前面的方式

有關於C/C++的語法, 程式等

將視窗提到最前面的方式

文章aarontu » 2008年 11月 27日, 17:16

window 2000之後版本,需要先取得該視窗焦點才可以SetForegroundWindow,最後在釋放
實作如下:
AttachThreadInput(GetWindowThreadProcessId(::GetForegroundWindow(),NULL),GetCurrentThreadId(),TRUE);
SetForegroundWindow();
AttachThreadInput(GetWindowThreadProcessId(::GetForegroundWindow(),NULL),GetCurrentThreadId(),FALSE);
aarontu
 
文章: 1
註冊時間: 2008年 11月 27日, 16:56
 

回到 C/C++

誰在線上

正在瀏覽這個版面的使用者:沒有註冊會員 和 1 位訪客

cron