Home » Community » Newbie corner » Changing cursor
|
Re: Changing cursor [message #43120 is a reply to message #43119] |
Thu, 08 May 2014 19:47   |
 |
Klugier
Messages: 1099 Registered: September 2012 Location: Poland, Kraków
|
Senior Contributor |
|
|
Hello xawery,
You can override your cursor image readily. Here is sample code:
Image MyCoolCtrl::CursorImage(Point p, dword keyflags)
{
return Image::Hand(); // <- Hand cursor image depending on operating system theme.
}
In your header file you will need also to override "CursorImage" virtual method:
class MyCoolCtrl : public Ctrl {
public:
virtual Image CursorImage(Point p, dword keyflags);
};
Moreover, I enclosed stock cursor list that you can use in your applications (Based on CtrlCore/ImageX11.cpp source file):
Image Image::Arrow()
Image Image::Wait()
Image Image::IBeam()
Image Image::No()
Image Image::SizeAll()
Image Image::SizeHorz()
Image Image::SizeVert()
Image Image::SizeTopLeft()
Image Image::SizeTop()
Image Image::SizeTopRight()
Image Image::SizeLeft()
Image Image::SizeRight()
Image Image::SizeBottomLeft()
Image Image::SizeBottom()
Image Image::SizeBottomRight()
Image Image::Cross()
Image Image::Hand()
BTW, I think that this list should be included in U++ documentation. It will help a lot.
Sincerely,
Klugier
U++ - one framework to rule them all.
[Updated on: Thu, 08 May 2014 19:48] Report message to a moderator
|
|
|
|
Re: Changing cursor [message #43157 is a reply to message #43119] |
Tue, 20 May 2014 19:30  |
nlneilson
Messages: 644 Registered: January 2010 Location: U.S. California. Mojave &...
|
Contributor |
|
|
xawery :
I did that by changing the cursor image using M$ Paint in the first version of Win XP. It was 'cute' for less time than it took to change it.
|
|
|
Goto Forum:
Current Time: Sun Apr 27 10:20:29 CEST 2025
Total time taken to generate the page: 0.00945 seconds
|