Win32 SetForegroundWindow unreliable

前端 未结 7 565
时光取名叫无心
时光取名叫无心 2020-12-05 08:17

I have a rather complex series of applications which depend on the ability to switch applications in the foreground.

My problem is, every 5 or 6 times of switching t

7条回答
  •  误落风尘
    2020-12-05 08:32

    You also need to consider the chances of window being minimized. If the window or various application are minimized then SetForegroundWindow(hApp) won't work. To be safe use ShowWindow(hApp, 9); I prefer value 9. Have a look at its documentation and choose which you find fit for you.

提交回复
热议问题