Hi,
This may be an incredible stupid question (I'm great at those and always improving that), but is it through hooking possible to detect when a window pops to the foreground? (I'd like to do this in VC but that's a detail).
I know I can poll the foreground window, but I'd specifically wouldn't want to do that.
Anyone?
Thanks,
Kaj
Detect when a window comes to front?
-
- Posts: 380
- Joined: Sat Dec 11, 2004 2:11 am
- Location: San Francisco Bay Area, CA USA
- Contact:
Re: Detect when a window comes to front?
You wouldn't need madCodeHook. Just use SetWindowsHookEx(WH_SHELL, ...) and get the HSHELL_WINDOWACTIVATED message. Or use the WH_CBT and get the HCBT_ACTIVATE message.sourcerer wrote: is it through hooking possible to detect when a window pops to the foreground? (I'd like to do this in VC but that's a detail).
-- David
http://www.dcsoft.com
Thanks :o)
Thanks David.
It had to be simple. Yet, I find not many things simple once it involves microsoft code.
Again,
Thanks,
Kaj
It had to be simple. Yet, I find not many things simple once it involves microsoft code.
Again,
Thanks,
Kaj