OK, I partially managed to do it with the following code: GetForegroundWindow()->ShowWindow(SW_SHOWMINIMIZED); CWnd* pCurrentWindow; POINT pt; GetCursorPos(&pt); pCurrentWindow = WindowFromPoint(pt); pCurrentWindow->SetForegroundWindow(); The problem is that it will only get the focus of windows behind the cursor (mouse) Any idea how to get the next window regardless to the cursor location ?
Best Regards - Yovav Gad CEO and founder of MicroMighty, Inc.
modified on Saturday, April 25, 2009 6:11 AM