Hide and restore the specified windows operation window

Recommended for you: Get network issues from WhatsUp Gold. Not end users.

1, Hide specified window

HWND hWnd = ::FindWindow(NULL, _T( "The window title ")); // the window title to use their own tasks window title

if(hWnd != NULL) {
//::SetForegroundWindow(hWmd);
//::BringWindowToTop(hWmd);
::ShowWindow(hWnd,SW_MINIMIZE);
::SendMessage(hWnd, WM_KEYDOWN, (WPARAM) VK_ESCAPE, 0);
}

2, Restoring display the specified window

HWND hWnd = ::FindWindow(NULL, _T( "The window title ")); // the window title to use their own tasks window title
if(hWnd != NULL) {
::SetForegroundWindow(hWnd);
::BringWindowToTop(hWnd);
::ShowWindow(hWnd,SW_MAXIMIZE);
::SendMessage(hWnd, WM_KEYDOWN, (WPARAM) VK_F2, 0);

}


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download

Posted by Omar at December 27, 2013 - 1:56 PM