here : http://www.catch22.net/tuts/msgbox.asp
I've red an extremely interesting article about hooking MessageBox'es.
"It is important to highlight the call to GetCurrentThreadId. It is possible to install a system-wide hook by specifying the module-handle of a DLL in which the hook procedure resides. Whenever an hooked event occurs in another process, Windows automatically loads this DLL into that process, which then enables the hook procedure to be executed in that process's address space. This is obviously quite an overhead, and is a feature that we do not require. To avoid this happening, we can specify a NULL module handle, and just install the hook for the current thread." was a part of the text.
What I want to do now, is adapt the code so that the hook is system-wide (I know it's "heavy" for a system to have a system-wide hook installed, but I'm just interested in getting this to work, because I'm interested in it.)
So what I want is that EVERY MessageBox from EVERY program is hooked , so that I can replace the YES/NO by a Klingon version (HIja'/ghobe') (yes, I know it's childish)
Can anyone help me to adapt that code?