I am writing a security program, and was wondering if anyone could tell me how to prevent the input focus from ever leaving my program.
The program is dialog based, it is not an SDI or MDI. It is not full screen, and I'd really like to keep it that way.
I have tried setting a timer (50ms) and seeing if the active window is ever NOT mine, but, to my dismay, the timer messages aren't sent when my main window isn't active.
Also, for some reason, the following doesn't work:
void CLockoutDlg::OnKillFocus (CWnd* pNewWnd)
I wouldn't mind hearing any methods for preventing task switching. So far, I've managed to disable ALT-TAB, but the user can still click on another program behind mine, thereby bringing it into focus.
Anyone have any ideas?
Note: If it turns out that the solution is more complex than it seems, I'll increase the number of points.