[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!
Re: Bug in Paul Catons SelfSub
Re: Bug in Paul Catons SelfSub
Quote:
Originally Posted by
Hack
Moved From The CodeBank
Sorry, I had problems to access this forum.
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?
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.
Re: Bug in Paul Catons SelfSub
Quote:
Originally Posted by
Merri
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.
Re: Bug in Paul Catons SelfSub
Quote:
Originally Posted by
LaVolpe
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!
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 ;)
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?
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.