Results 1 to 10 of 10

Thread: [RESOLVED] Bug in Paul Catons SelfSub

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2009
    Posts
    95

    Resolved [RESOLVED] Bug in Paul Catons SelfSub

    I used Paul Catons SelfSub, which you can find here:
    http://www.planet-source-code.com/vb...8737&lngWId=-1

    I think there is a bug in the code:
    there is always passed 'True' to the 'zWndProc1' for the argument 'bBefore' - it doesn't matter, if MSG_BEFORE, MSG_AFTER or MSG_BEFORE_AFTER is used for the 'When' arguement in 'sc_AddMsg'.

    Can anyone reproduce this issue? - I am using the latest Windows XP version.
    I couldn't fix it myself. Could anyone help me with that, please?

    Many thanks!

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Bug in Paul Catons SelfSub

    Moved From The CodeBank

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Sep 2009
    Posts
    95

    Re: Bug in Paul Catons SelfSub

    Quote Originally Posted by Hack View Post
    Moved From The CodeBank
    Sorry, I had problems to access this forum.

  4. #4
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: Bug in Paul Catons SelfSub

    You are going to have to provide more details. I searched the forms & classes and found no zWndProc1 reference. Are you sure your link is correct?
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  5. #5
    VB6, XHTML & CSS hobbyist Merri's Avatar
    Join Date
    Oct 2002
    Location
    Finland
    Posts
    6,654

    Re: Bug in Paul Catons SelfSub

    I can confirm this bug exists, it was with one of the latest versions released by Paul Caton. You should find Ralph Eastwood's updated version somewhere (I'm on a netbook so searching is bit of a pain). If you're working with a class you can find my SelfTimer class that uses a fixed version (and overall changed code). So just look for new versions and you ought to find one that works 100%.


    Edit!
    Now that the page loaded, are you sure you're using that version? I think it should be fixed in that version.

  6. #6
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: Bug in Paul Catons SelfSub

    Quote Originally Posted by Merri View Post
    I can confirm this bug exists, it was with one of the latest versions released by Paul Caton.

    Edit!
    Now that the page loaded, are you sure you're using that version? I think it should be fixed in that version.
    Yes, Paul fixed this himself in later versions too. The OP should go back to PSC and look for Paul's most recent version.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Sep 2009
    Posts
    95

    Re: Bug in Paul Catons SelfSub

    Quote Originally Posted by LaVolpe View Post
    You are going to have to provide more details. I searched the forms & classes and found no zWndProc1 reference. Are you sure your link is correct?
    Yes, you are totally right!

    I did download the code example a long time ago and couldn't remember, where I got it from... I made some searches and found your example and because of the similarity (SelfSub & Paul Caton) I got mistaken: it is not the right one. I should have checked it first. My bad!

    The one I used is this:
    http://www.planet-source-code.com/vb...64867&lngWId=1

    And just yet I found also this one *uh*:
    http://www.planet-source-code.com/vb...66665&lngWId=1

    Sorry for stealing your time.
    Best!

  8. #8
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: Bug in Paul Catons SelfSub

    No biggie, it's happened to me from time to time. But I'm getting old and that's my excuse
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  9. #9

    Thread Starter
    Lively Member
    Join Date
    Sep 2009
    Posts
    95

    Re: Bug in Paul Catons SelfSub

    Ok

    Just one more question:
    Did you improve Pauls code with your example, so that I should switch to your one?
    What are the main differences?

  10. #10
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: Bug in Paul Catons SelfSub

    Improve is a fuzzy term. I changed some things so it could incorporate hooking along with subclassing. I also added some additional code to make it more IDE safe.

    Don't get me wrong, I think Paul's thunks are the best on the planet for those that are not proficient with subclassing. Another reason to use his thunks is to prevent adding modules to one's project just for subclassing. And yet another good reason is if you are going to share projects (raw source code) with others. His thunks help prevent the novice from crashing.

    I don't use his code any longer in anything I do. I feel completely comfortable with subclassing and prefer to do it without all the hacks. Once a project is compiled, IDE-safe subclassing is pointless anyway, really.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

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