Is there a way using Win32, to register for notifications when a new window is created. I\'m trying to keep a list of current open windows, but am now just polling the list
You could try WinEventHook library for autohotkey. Try modifying the notepad popup blocker example with the following:
HookProc( hWinEventHook, Event, hWnd, idObject, idChild, dwEventThread, dwmsEventTime )
{
if Event ; EVENT_SYSTEM_FOREGROUND = 0x3
{
WinGetTitle, title, ahk_id %hWnd%
If (title = "your_window_name"
msgbox, your window has been created
}
}