Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
I am selecting the MSN Messenger 'Conversation' window. I then hit a 'hot-key' combo to trigger my script. The script uses DllHwnd with WinGetActive to get the handle.
WinGetActive correctly identifies the window. It advises the correct title 'Fred - Conversation' and a 'Class' of 'IMWindowClass'.
Using cWndInfo with both parameters 3 and 9 - they both return a '0'. i.e. that the 'conversation' window does not have an 'owner/parent'....
ActiveWindow = WinGetActive() ;get name of 'active window' active_window_handle=DllHwnd(ActiveWindow) ;get 'handle' active_window_class=cWndInfo(active_window_handle,2) ;get 'class' Is_There_Owner_handle = cWndInfo(active_window_handle,9) Is_There_Parent_handle = cWndInfo(active_window_handle,3)WITH MSN MESSENGER 'CONVERSATION WINDOW' THESE BOTH RETURN '0'
Since MSN Messenger opens separate windows for each chat session, there's probably no parent-child relationship at the window level. Each window may be a top-level window. However, what isn't clear is whether or not the MSN Messenger uses a single process [with multiple threads] to handle all of the windows or if it creates separate processes running their own .EXE files to handle all of the windows. I think it runs it all in one multi-threaded process.
Anyway, there is no guarantee that because you click on a widget in one window to launch another window that they are related. Nor is there any guarantee that the parent of the launching widget is related to the launched window. The only necessary connection between a launched and launching window it that user input to one window may cause the appearance of the other.
Article ID: W16749
File Created: 2005:02:18:12:22:14
Last Updated: 2005:02:18:12:22:14