   Get hWnd from another application
  if i have an application running in my Window, can i get the hWnd from that application, from another application.for example, i''m running command prompt, and than i''d like to make an application that can get the cmd hWnd so i can sending the application message?? 
  FindWindow() and FindWindowEx()   Colin Jeanne | Invader''s Realm;  thx, for the function Invader X.but it leads to another problem.how can i know the classname, and the windowname, cause the other application was not by me. ;quote:Original post by EkEk   thx, for the function Invader X.but it leads to another problem.how can i know the classname, and the windowname, cause the other application was not by me.   If you're using one of the various incarnations of visual studio, there's a nifty little tool called 'Spy++' which you can use to get all sorts of information about active windows, including the class name, window name etc.That said, if it's console windows you're messing with, you'll have problems. Spy++ won't work on these, and it's likely that whatever you're trying to do to them won't work  either.EDIT: I cna spel gud   [edited by - Sandman on February 9, 2004 10:18:30 AM];  If you dont mind a little bit of user interaction, you can hook the mouse and have the user click on the window he wants your window to play with. Then you only need to handle the appropriate hook message.   Colin Jeanne | Invader''s Realm