
Dialog based app doesn't get focus when restored
Hi all
I have a simple dialog based application that starts minimized and shows
when the user press a hotkey defined in a keyboard hook. My problem is that
I can't give focus to the window app when it's restored.
I use this line of code to retore the window:
SetWindowPos(&wndTopMost,0,0,size.cx,size.cy,SWP_SHOWWINDOW);
but only shows the window, doesn't activate it (the appbar is gray), so the
keyboard inputs go to the last seen window. I tried with SetFocus and
SetForegroundWindow after that, but none of them works.
Can anybody help me to show the window with focus on it, please?