[2.0] Drawing on another application
My question is similar to this thread:
http://vbforums.com/showthread.php?t=498183
Actually, my question for this thread was asked as the last post of that thread, but no one really answered it and it's best to not hijack a thread, I guess.
As of right now, I wrote an application that will automatically redraw the image given pixel by pixel, but is way too slow and takes large images many, many images which is unacceptable. You can see the code I have written here:
http://rafb.net/p/zwj94m91.html
Anyways, I was hoping to think of a more "hacking" solution into doing this. Could I simply just not draw onto the canvas? Well, of course I can, but it is not actually drawn on. It is just visually there and right when I click away or move the window, it disappears.
My question for this thread: Is there a way to possibly "hook" into the WM_PAINT message handler and actually have the program draw the image as if it was drawn onto the screen using the mouse.
Would such a thing be possible? I got stimulating mouse clicks to redraw the image working properly but it is just too slow. I need a way of just pasting the image onto the canvas and having the program think it was actually drawn on there using a mouse or something of the sort and have it stick.
Any ideas? Thanks :wave:
Re: [2.0] Drawing on another application
404 error on your link.
Is this for your app or are you automating some other app?
Re: [2.0] Drawing on another application
Yea rafb takes down pastes after a couple days of inactivity I guess. I'll just re upload.
http://rafb.net/p/zwj94m91.html
And I'm trying to automate some other app.
Re: [2.0] Drawing on another application
Well if you are trying to automate some other app then to interect its messages you will need to use of Moeurs C++ dll to do it. Search Code Bank.NET for it. That will get you farther and probably better performance.
Re: [2.0] Drawing on another application
Can I use a C++ DLL with a C# application?
Re: [2.0] Drawing on another application
Yes, as you just need to add the reference I believe. The instructions are all in Moeurs thread.