|
-
Aug 13th, 2000, 02:39 PM
#1
Thread Starter
Hyperactive Member
In almost every samples of subclassing solves how to subclass your own application. But I am not able to subclass any window (through handle) and I don't know where is the problem. Can somebody help me to subclass another window (like Spy++)?
-
Aug 13th, 2000, 02:49 PM
#2
I dont have the code anymore, but I once used an example found on here(vb-world) and modified it to catch all clicks for internet explorer.
it worked fine, you just replace the hwnd of your form, with the hwnd of the window you want to subclass.
-
Aug 13th, 2000, 06:40 PM
#3
I tried it once and it didn't work 
In order to Subclass windows that aren't yours you must use a callback function that is located in an external DLL.
You can't create this kind of DLLs in VB though.
-
Aug 13th, 2000, 06:57 PM
#4
Make sure that it's a Standard DLL, not an ActiveX DLL. To create standard DLL's, use Visual C++ because VB can only create OLE DLL's.
-
Aug 13th, 2000, 10:12 PM
#5
Originally posted by Sc0rp
I tried it once and it didn't work 
In order to Subclass windows that aren't yours you must use a callback function that is located in an external DLL.
You can't create this kind of DLLs in VB though.
damn, must have been dreaming then...
I hate that... dreams seem so real.
-
Aug 14th, 2000, 08:06 AM
#6
-
Aug 14th, 2000, 08:17 AM
#7
Dennis: Are you sure you didn't use a DLL for it?
-
Aug 15th, 2000, 07:39 AM
#8
oh yeah, I think I used a DLL......
I dont have it anymore ... it was on my HDD before I reformatted....
-
Aug 15th, 2000, 12:06 PM
#9
Fanatic Member
Call me cynical, but
-
Aug 15th, 2000, 12:52 PM
#10
Is there a way to Subclass windows using CopyMemory in some way?
I mean SetWindowLong sets the value of the proc in the memory, doesn't it?
-
Aug 15th, 2000, 02:42 PM
#11
Monday Morning Lunatic
With SetWindowLong you provide a pointer to the function (this is what AddressOf gets). I think using FindWindow and SetWindowLong should be able to get it sorted. On the other hand, you could set a global hook, in which case it's easier to use a DLL.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Aug 16th, 2000, 01:46 AM
#12
Thread Starter
Hyperactive Member
And Windows doesn't have a DLL file which could call my function?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|