U++ framework
Do not panic. Ask here before giving up.

Home » Developing U++ » U++ TheIDE and Library: Releases and ChangeLogs » Ctrl::OverrideCursor
Re: Ctrl::OverrideCursor [message #14348 is a reply to message #14319] Sat, 23 February 2008 10:00 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14291
Registered: November 2005
Ultimate Member
Tom1 wrote on Fri, 22 February 2008 08:14

Hi,

Ctrl::OverrideCursor() does not seem to react immediately (at least on Vista) but instead requires control to be returned to the system. I added SetMouseCursor(m) call to the CtrlMouse.cpp as follows and got immediate response:

Image Ctrl::OverrideCursor(const Image& m)
{
Image om = CursorOverride();
CursorOverride() = m;
DoCursorShape();
SetMouseCursor(m); // Added by tom
return om;
}

If you think it does not mess up anything else in UPP, please add it to the source. (The reason for immediate response requirement is that I need to show a wait cursor when processing some lengthy user mouse input requests.

// Tom


Well, this is really weird, as DoCursorShape calls SetMouseCursor too...

I have tested with this code, without proposed patch:

#include <CtrlLib/CtrlLib.h>

using namespace Upp;

struct App : TopWindow {
	virtual void LeftDown(Point, dword) {
		Image m = OverrideCursor(CtrlImg::exclamation());
		Sleep(1000);
		OverrideCursor(m);
		Sleep(1000);
	}
};

GUI_APP_MAIN
{
	App().Run();
}


and everything seems to work OK (WinXP).

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: SDL updated from 1.2.12 to 1.2.13
Next Topic: to_string, to_wstring
Goto Forum:
  


Current Time: Mon May 11 01:22:40 GMT+2 2026

Total time taken to generate the page: 0.00695 seconds