U++ Forum - RDF feed
https://www.ultimatepp.org/forums/
CursorImage() not called
https://www.ultimatepp.org/forums/index.php?t=rview&goto=47148&th=9816#msg_47148
class CMsgBoxW : public TopWindow
{
virtual Image CursorImage(Point p, dword keyflags)
{
return Image::Arrow();
}
...
CursorImage() is never called in this or my app main window which has a similar class member.
I need to implement my own cursor selection system as the WaitCursor class and my own similar ArrowCursor class result in restoring an obsolete cursor shape when instantiated before a cursor change (using OverrideCursor()) and goes out of scope after (in multi-threaded app).
Why is CursorImage() is never called?
Thanks,
Jan]]>awksed2016-12-21T15:56:55-00:00Re: CursorImage() not called
https://www.ultimatepp.org/forums/index.php?t=rview&goto=47150&th=9816#msg_47150
Check Ctrl::OverrideCursor]]>mirek2016-12-21T20:14:47-00:00Re: CursorImage() not called
https://www.ultimatepp.org/forums/index.php?t=rview&goto=47152&th=9816#msg_47152
Thanks for your reply.
If I dont make a prior call to OverrideCursor(), CursorImage() is called so thats now ok.
I need a way to only change the cursor to an arrow when within class CMsgBoxW window so the user is not confused by a wait cursor, while continuing to show a wait cursor (if set) within the main app window and its controls.
This is to handle e.g. the following scenario:
1) The app Init() function is a thread that sets the cursor to wait at the start and sets the cursor to arrow when it ends.
2) That thread encounters an error that must be reported (using a CMsgBoxW window) to the user who must click the OK button to close the CMsgBoxW window.
3) The CMsgBoxW is modeless and the user may close either before or after the Init() thread completes and sets the cursor to arrow.
How may I show the wait cursor while the mouse is within the app main window, its tabs and controls, and the arrow cursor when the mouse is within the messagebox window?
(PromptOK also suffer from showing a wait cursor - which is confusing to a user - when OverrideCursor() has been called.)
Some way of overriding the "overidden" cursor in only the CMsgBoxW class would seem to be the simplest way.
TIA.
Jan
]]>awksed2016-12-22T13:01:49-00:00Re: CursorImage() not called
https://www.ultimatepp.org/forums/index.php?t=rview&goto=47696&th=9816#msg_47696
awksed wrote on Thu, 22 December 2016 14:01
Hi Mirek,
Thanks for your reply.
If I dont make a prior call to OverrideCursor(), CursorImage() is called so thats now ok.
I need a way to only change the cursor to an arrow when within class CMsgBoxW window so the user is not confused by a wait cursor, while continuing to show a wait cursor (if set) within the main app window and its controls.
This is to handle e.g. the following scenario:
1) The app Init() function is a thread that sets the cursor to wait at the start and sets the cursor to arrow when it ends.
2) That thread encounters an error that must be reported (using a CMsgBoxW window) to the user who must click the OK button to close the CMsgBoxW window.
3) The CMsgBoxW is modeless and the user may close either before or after the Init() thread completes and sets the cursor to arrow.
How may I show the wait cursor while the mouse is within the app main window, its tabs and controls, and the arrow cursor when the mouse is within the messagebox window?
(PromptOK also suffer from showing a wait cursor - which is confusing to a user - when OverrideCursor() has been called.)
Some way of overriding the "overidden" cursor in only the CMsgBoxW class would seem to be the simplest way.
TIA.
Jan
My bet is that in your main thread, message queue is not being processed (e.g. by Ctrl::ProcessEvents).]]>mirek2017-03-07T12:13:51-00:00