他 AP から,HWND を指定して前面に移動する方法.
bool Window_Foreground (HWND hWnd)
{
if (hWnd == NULL) { return false ; }
if (!::IsWindow(hWnd)) { return false ; }
{
if (::IsIconic(hWnd)) {
WINDOWPLACEMENT wndpl = { 0 } ;
::GetWindowPlacement(hWnd,&wndpl) ;
wndpl.showCmd = SW_RESTORE ;
::SetWindowPlacement(hWnd,&wndpl) ;
}
SetForegroundWindow(hWnd) ;
}
return true ;
}
0 人中 0 人がこの 投稿 は役に立ったと言っています。

[…] SetForegroundWindow […]