Click to See Complete Forum and Search --> : subclassing problem


Crazy D @ Work
January 7th, 2000, 07:06 AM
Hi,
I have a little problem with subclassing.
I have a usercontrol, one of the control is a resize control (that the form cant be resized smaller then specified size). This works perfect.
Now I want to add subclassing to another control in the ocx. This has a few buttons, and I want to catch the function-keys (since the shortkeys for those buttons are the function-keys), but for some reason, when I use the same code I use for the resize subclass, VB crashes as soon as the "Hook" function is called. No matter what I try, it keeps crashing.
Any idea what I can be overlooking?
I've subclassed a LOT of times, and it always works... is it just a bad subclassing day or what?? (*LOL*)

Crazy D @ Work :-)

Chris Eastwood
January 7th, 2000, 07:36 AM
How are you doing the Subclassing ? Are you using a subclassing control / dll or are you doing it all yourself ?

Chris Eastwood

CodeGuru - the website for developers
http://codeguru.developer.com/vb

Crazy D @ Work
January 7th, 2000, 07:39 AM
I'm using my own subclassing routine (a module in the ocx, using setprop to store the info I need).
I think I solved the crashing problem... bloody typo (I *knew* friday afternoons are a bad moment to work.. *L*) (and instead of VB giving an error when saving, it just crashes...)

Crazy D @ Work :-)

Chris Eastwood
January 7th, 2000, 08:12 AM
So you've fixed it then ?


Chris Eastwood

CodeGuru - the website for developers
http://codeguru.developer.com/vb

Crazy D
January 7th, 2000, 08:17 AM
No not really, but that has not much to do with the subclassing... my control can't be loaded anymore :-( But since I didn't recompile it while I was playing with it, VB must have screwed things up when it crashed (not the first time that happens :-(

Crazy D :-)
"One ring rules them all"

Crazy D
January 7th, 2000, 08:23 AM
pfew.. 2 reboots later (glad I have 2 computers :-) it works again...

Crazy D :-)
"One ring rules them all"