Access another dialogs controls
-
Is there an easy way to access controls fron another applications dialog? I need the ability to pick up data from an application that runs concurrently with my app, however I'm not the author of the other application. I'd like to be able to find the control field ID's and pickup what the user keyed, and dump that data into my application to save key strokes (ie. Name, Address, City, State, Zip).
-
Is there an easy way to access controls fron another applications dialog? I need the ability to pick up data from an application that runs concurrently with my app, however I'm not the author of the other application. I'd like to be able to find the control field ID's and pickup what the user keyed, and dump that data into my application to save key strokes (ie. Name, Address, City, State, Zip).
The best thing to do would be to write a hook DLL and inject it into that applications address space for hooking the messages if you want to save keystokes and such like that. I wouldn't suggest doing this though unless you are very experienced. Another alternative is to use FindWindow() to find the dialog, then use GetWindow() with the GW_CHILD option until you find the specific control. Once you find that control, call SendMessage() on that HWND and send the WM_GETTEXTLENGTH and WM_GETTEXT messages to get the window text from it. -- Rocky Dean Pulley
-
The best thing to do would be to write a hook DLL and inject it into that applications address space for hooking the messages if you want to save keystokes and such like that. I wouldn't suggest doing this though unless you are very experienced. Another alternative is to use FindWindow() to find the dialog, then use GetWindow() with the GW_CHILD option until you find the specific control. Once you find that control, call SendMessage() on that HWND and send the WM_GETTEXTLENGTH and WM_GETTEXT messages to get the window text from it. -- Rocky Dean Pulley