I need to draw on another apps DC's, I have used setpixelv, but it seems like those dots erases like, dots erases on the form when you don't use autoredraw. Do anyone have any solutions? This is the third time i'm asking!!!!
Printable View
I need to draw on another apps DC's, I have used setpixelv, but it seems like those dots erases like, dots erases on the form when you don't use autoredraw. Do anyone have any solutions? This is the third time i'm asking!!!!
Bitblt, setpixelv or whatever, they won't change the DC, it's like I said, removed when another window overlaps it and it gets focus again. It's too sad. :(
Hello kedaman,
I have a thought but I’m not sure how to implement it. It sounds like you need to trap the other DC's paintpicture message. I was playing with the winproc stament and using it to capture the paintpicture message from the system in my app, maybe there could be a way to subclass the other app and do the same? It's just a thought.
Best,
Roger
Damn, you're the third one that suggest me that. It would drain performance wouldn't it? Isn't there any direct way to do this?!?!?!
I've told you Kedman, you need to subclass that window, At the moment I think that's gonna take a C++ dll, I'm still working on a way of doing it in VB, at the moment I'm trying to copy the substitute window procedure thunk into the process but I don't think that'll work, I thing I have to create a new thunk, or a thunk of a thunk and copy that. (This is why it's taking a while, I only found out what a thunk was today (Don't ask))
RvA, I've just Read your post, Have you had any success subclassing a window of another App, or have I misinterpreted you.
Well, im just going to sit here with those sunglasses and wait. No, I have tons of things to do.
Sam Finch, what's a "thunk". Just curious.
Cady
Yeah, what's a thunk ? Hehe!
The keyword you selected can't be found in Visual Basic Help. You may have misspelled the keyword, selected too much or too little text, or asked for help on a word that isn't a valid Visual Basic keyword.
That's "thunk", according to VB5 EE help
"Thunking is the way that Windows enables relocatable code".I copied this from MSDN Library. I read their explanation and don't know any more than I did before.
But what else is new.....
Cady
Subclassing another apps windows in win32 (w95/98/98SE) means intercepting and processing the messages intended for those windows. The only way to do this is to set up a system hook, which tells the operating system that whenever it encounters a certain type of event (key stroke, paint message, etc.) it should call your hook procedure before doing anything else. You cannot set up system hooks using VB alone (except maybe a system journal/playbook hook, not clear on that). The hook procedure has to reside in a thread outside of your application, in a dll written in C/C++ (or some other "adequate" language). For reasons I don't fully comprehend just yet, the kind of dll that you can make in VB will not work.
Hope that helps.