MCPcopy Create free account
hub / github.com/DSVVA/MHY_Scanner / SetWindowToFront

Method SetWindowToFront

src/UI/WindowMain.cpp:517–527  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

515}
516
517void WindowMain::SetWindowToFront() const
518{
519 HWND hwnd = reinterpret_cast<HWND>(winId());
520 if (GetForegroundWindow() == hwnd)
521 return;
522 ShowWindow(hwnd, SW_MINIMIZE);
523 ShowWindow(hwnd, SW_SHOWNORMAL);
524 SetWindowPos(hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE);
525 SetForegroundWindow(hwnd);
526 SetWindowPos(hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE);
527}
528
529void WindowMain::failure()
530{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected