I'd like to make some changes to wait cursor behaviour but want to listen others opinion.
When following conditions present:
- Map.Redraw() is called;
- DisableWaitCursor is false;
- modal window other then that in which map placed is active;
the cursor is changed to wait cursor first and then to CURRENT MAP CURSOR. But it's a modal window - no map is placed in it. So it doesn't make sense to show, for example, zoom in cursor there. When one move a mouse cursor reverts to normal, but still it looks like a bug.
The solutions I propose are:
1. Revert to window cursor which was set before redraw.
2. Not to use wait cursor in the modal windows at all. Condition like this can be used then:
HWND wndActive = ::GetActiveWindow(); if ((wndActive == this->GetSafeHwnd()) || (wndActive == this->GetParentOwner()->GetSafeHwnd()))
I'm waiting for your suggestions.
I don't see any problems with your suggestion.
Would you mind reporting this to Mantis as well as an enhancement request so we can link the code changes to it?
Don't forget to read the new documentation: www.mapwindow.org/documentation/mapwingis4.8
Join us Google+: MapWindow GIS Google+ Community
Join the MapWindow Group on LinkedIn! LinkedIn - MapWindow Group
Download the latest beta installer at:
Follow me on Twitter MapWindow_nl to read when a new installer is published.
Release manager, configuration manager and
forum moderator of MapWindow GIS
Owner of MapWindow.nl - Support for
Dutch speaking users: www.mapwindow.nl
Everything I say or write is my personal opinion and
not the opinion of the company I work for.
View my profile on LinkedIn
I was just scanning through old email and noticed that I did not respond to this one.
What I am going to ask may not be related to what you have in mind here, but its worth a try.
It seems to me that the cursor shape assignments in tkCursorMode are a bit messed up and that some more cursor shapes would be nice.
setting the cursor in a plug-in to tkCursorMode.cmNone does not show as normal standard arrow pointer, it shows as double headed horizontal arrow.
An added cursor shape like the one for tkCursor.Cross (a fine cross) would be great for my Image to Map Registration plug-in.
I don't know about plug-ins, but in the stand-alone application it's possible to display various cursors. Have you tried to load user defined cursor?
Map.CursorMode = cmNone
Map.MapCursor = crsrUserDefined
Map.UDCursorHandle = handle
Changing of Map.MapCursor to any other shape should work as well I suppose:
Map.CursorMode = cmNone
Map.MapCursor = crsrCross
If cursors aren't set right from plug-in then provide me with some sample code to reproduce the problem and I'll try fix it.
tkCursorMode enumeration actually defines map reaction to mouse events in the first place, rather then simply cursor shape. So it make sense to add new constant only if completely new reaction to mouse events is needed. From my experience default behaviours usually are too limited and in most cases it's better to set CursorMode to cmNone and write own mouse event handling routine. And it's possible to set any cursor shape then.
thanks for driving this home to me. I had an inkling about the different purposes of tkCursor and tkCorsorMode, but did not think about using them in conjunction.
Stupid of me. Appart from having to iron out my previous work arounds, I now get the cursor effect I want.