You can install a hook procedure using the
SetWindowsHookEx function[
^].
The best procedure type for your request will be probably
WH_CALLWNDPROCRET
. From inside the procedure handler check for a message that is involved with window creation like
WM_CREATE
.