-
Feb 5th, 2023, 02:31 PM
#41
Re: VB6 - MouseWheel with Any Control (originally just MSFlexGrid Scrolling)
Originally Posted by VanGoghGaming
If you really want to experience the crash yourself, it's very easy to replicate. Slap a "Microsoft InkEdit Control" on a form, subclass it with your favorite method, don't even need to write any additional code, press F5 to run the project, close the form, the IDE will crash. To avoid the crash, unsubclass it explicitly.
Just because unsubclassing on "WM_DESTROY" works for most controls doesn't mean it's a good practice but to each his own I guess...
I did spend a bit of time looking at the InkEdit control, and apparently it doesn't issue a DestroyWindow call when the form it's on is destroyed. IMO, that's a bug in the InkEdit control, and a possible memory leak. I Googled, and apparently there some degree of discussion about this bug in the InkEdit control. Furthermore, this is the first time I've seen such a bug in a user control (as destroying any created hWnd is sort of a "first order of business" when writing such controls).
----------
So, a couple of thoughts:
1) I don't see a reason to generally change my style of subclassing because of a bug in one specific control. I've never used the InkEdit control, but, if I ever do, and I also wish to subclass it, I'll try and remember this.
2) We're getting pretty far afield from the subject of this thread. So, if you (or anyone) wishes to discuss this further, I'd recommend starting a new thread over in the regular Q&A area.
Last edited by Shaggy Hiker; Feb 5th, 2023 at 10:48 PM.
Reason: Cleaned up after the other post was cleaned.
Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.
-
Apr 21st, 2023, 06:48 AM
#42
Lively Member
Re: VB6 - MouseWheel with Any Control (originally just MSFlexGrid Scrolling)
Originally Posted by bushmobile
subclassing works fine in the IDE (and the exe) unless the normal program flow is interrupted - for example, by pressing the stop button or attempting any runtime debugging.
Is it not possible to capture the events of pressing the stop button or attempting any runtime debugging that does to remove hook at that moment?
Some message or event has to happen when the stop or debug button is pressed.
-
Apr 21st, 2023, 09:45 AM
#43
Re: VB6 - MouseWheel with Any Control (originally just MSFlexGrid Scrolling)
Page 2 of this thread has been damaged in some way. The posts on page 1 are accessible, as are the posts on this page, but those on page 2 will probably never be. Whether or not this can be cleaned up remains to be seen.
My usual boring signature: Nothing
-
Apr 21st, 2023, 09:56 AM
#44
Re: VB6-MouseWheel With Any Control
In an attempt to clean up the corrupted portion of page 2, I managed to screw up the entire thread. Fortunately, it was still in the buffer, so I moved all the posts that were good over to a new thread. I couldn't move the original post, as that would effectively move the entire thread...including the corruption, which then spread to the entire thread.
Therefore, I moved the contents of the first post of the old thread into the first post of the current thread, which was the second post of the old thread.
The posts that were on the second page are now lost, and almost certainly will remain so. Hopefully, there was nothing too important on there.
Last edited by Shaggy Hiker; Apr 21st, 2023 at 10:12 AM.
My usual boring signature: Nothing
-
Apr 21st, 2023, 12:11 PM
#45
Re: VB6-MouseWheel With Any Control
Thanks Shaggy. We (or definitely I) absolutely appreciate all you do.
Any software I post in these forums written by me is provided "AS IS" without warranty of any kind, expressed or implied, and permission is hereby granted, free of charge and without restriction, to any person obtaining a copy. To all, peace and happiness.
-
Apr 21st, 2023, 11:13 PM
#46
Lively Member
Re: VB6 - MouseWheel with Any Control (originally just MSFlexGrid Scrolling)
Originally Posted by James Reynolds
Is it not possible to capture the events of pressing the stop button or attempting any runtime debugging that does to remove hook at that moment?
Some message or event has to happen when the stop or debug button is pressed.
I think I find the answer, is in a code of VbAccelerator, here I put code of VBAccelerator and Work perfect, not crash the IDE when Pres Stop Button and also Permit Debug, and is very Flexible and Easy to implement in Any Form or Control, you can subclass what you want with the messages you want to intercept, and the funny thing is that the code is from VBAccelerator from 2004!!!
Here I put the VBAccelerator codes:
https://www.vbforums.com/showthread....60#post5602660
(In the message #53)
Last edited by James Reynolds; Apr 21st, 2023 at 11:14 PM.
Reason: Link Error
-
Apr 21st, 2023, 11:16 PM
#47
Lively Member
Re: VB6-MouseWheel With Any Control
Sorry, not find how erase a message
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
|