3
Reply

Handle Windows operating system window creation events

Andy Webster

Andy Webster

Feb 5 2010 10:10 AM
5.9k

Hi
Does anyone know if the Windows operating system exposes events to the Win32 API when it creates new windows.
I have written a shell to replace explorer.exe for a kiosk terminal. The kiosk terminal has multiple screens. My shell is configured with a list of applications to run, and on what screen to run them. It starts the applications and then manipulates the main window of each, moving it to the configured screen.
The issue I have is that one application, although it allows me to move it, when it opens child windows they always appear on screen 1, even if the main window is say on screen 3.
I want to intercept the creation of the child window and move it before it is displayed.
I already have all the code needed to determine the parent of any child window and be able to move it to any screen desired. What I cannot figure out is how to attach an event handler to the window creation event or if this is even possible, though I guess it is.
Anyone ?????????

Answers (3)