winapi - Is it possible to prevent an application from being activated (brought to front) without using DLL injection? -


i need write application a, intercepts wm_activate message window of application b in order prevent b becoming top-most application.

is possible without dll injection (add hook on message, process , "neutralize" series of winapi calls) ?

i think you're after:

locksetforegroundwindow

http://msdn.microsoft.com/en-us/library/windows/desktop/ms633532(v=vs.85).aspx

remarks system automatically enables calls setforegroundwindow if user presses alt key or takes action causes system change foreground window (for example, clicking background window). function provided applications can prevent other applications making foreground change can interrupt interaction user.

just don't forget unlock :)

edit:

try setwineventhook described here:

is there windows system event on active window changed?

then when unwanted window comes front can send background.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -