Implemented BindWinEvent for Windows Message events #196
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
While using ProjectExplorer, I noticed that FoxTabs wasn't working right. I figured this probably came down to event binding conflicts, since FoxTabs makes heavy use of events. Years ago, I discovered the following statement in the VFP Help file:
When binding to Windows message (Win Msg) events, only one hWnd to Windows message pairing can exist.
Due to this limitation, Greg Green ran into conflicts between FoxTabs and his utilities. So, he developed a small framework to work around the limitation. It basically converts Win Msg events to standard VFP events, which allow multiple bindings. There is more on this subject at http://www.joelleach.net/2010/04/11/foxtabs-092-and-multiple-windows-event-bindings/.
I implemented this framework with ProjectExplorer, and I have been using it for a couple of months. It resolved the conflicts, and I have not noticed any ill effects. That said, you would want to confirm that your Win Msg event bindings are still working as expected. If you refactor any of the code, please ensure that the VFPxWin32EventHandler interface remains the same and that the instance is named "_Screen.oEventHandler", as FoxTabs and ProjectExplorer will be sharing that object.
This is my first pull request, so let me know if I did it wrong! :)