CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Apr 1999
    Location
    Netherlands
    Posts
    181

    subclassing problem

    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 :-)

  2. #2
    Join Date
    May 1999
    Location
    Oxford UK
    Posts
    1,459

    Re: subclassing problem

    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

  3. #3
    Join Date
    Apr 1999
    Location
    Netherlands
    Posts
    181

    Re: subclassing problem

    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 :-)

  4. #4
    Join Date
    May 1999
    Location
    Oxford UK
    Posts
    1,459

    Re: subclassing problem

    So you've fixed it then ?


    Chris Eastwood

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

  5. #5
    Join Date
    Apr 1999
    Location
    Rotterdam, Netherlands
    Posts
    278

    Re: subclassing problem

    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"

  6. #6
    Join Date
    Apr 1999
    Location
    Rotterdam, Netherlands
    Posts
    278

    Re: subclassing problem

    pfew.. 2 reboots later (glad I have 2 computers :-) it works again...

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured