Click to See Complete Forum and Search --> : Sending Strings to another Application
alrabaca
July 17th, 2007, 07:33 PM
Hi there,
Basically Im trying to send a string to another application's edit box, how would I go about doing it, I have read up on HWND but could't understand how it works.
Could anyone post an example or give me where to look and a few tips.
Note: No im not trying to create any type of message flooders :)
Thank you.
alrabaca
July 18th, 2007, 05:34 PM
Anyone got any idea then? I've been working no this application for 3 days straight now, really want to finish it tonight.
EDIT: basically im getting close, ive worked out how to use the SendKeys::Send("message"); function but how do i find a window handle and send the string to the external window textbox. Ive tryed declaring HWND but my compiler comes up with an error saying that HWND is an undeclared identifier, so how would I declare it or/and what do I include into my classfile.
Thanks in advance
ashukasama
July 18th, 2007, 11:26 PM
Anyone got any idea then? I've been working no this application for 3 days straight now, really want to finish it tonight.
EDIT: basically im getting close, ive worked out how to use the SendKeys::Send("message"); function but how do i find a window handle and send the string to the external window textbox. Ive tryed declaring HWND but my compiler comes up with an error saying that HWND is an undeclared identifier, so how would I declare it or/and what do I include into my classfile.
Thanks in advance
in Managed C++ there is no HWND
Just Declare IntPtr (http://msdn2.microsoft.com/en-us/library/system.intptr%28VS.71%29.aspx) instead of HWND
When you take the HWND of process in IntPtr (http://msdn2.microsoft.com/en-us/library/system.intptr%28VS.71%29.aspx)datatype.
NoHero
July 19th, 2007, 04:24 AM
As said earlier there is no HWND: You need to DllImport the basic API calls and then use it. As HWND replacement you should try to use IntPtr, as pointed out earlier.
codeguru.com
Copyright WebMediaBrands Inc., All Rights Reserved.