把后台窗口调至前台显示

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// FindWindow取得窗口句柄
CWnd* hwnd = FindWindow(NULL, _T("PSS V4.06"));

if (NULL != hwnd)
{

CRect rect;
// 取得窗口大小

hwnd->GetWindowRect(rect);

// 显示

hwnd->SetWindowPos(NULL, rect.left, rect.top, rect.right, rect.bottom, TRUE);
}