> I would like to change the cursor type in my application.
>
> I'm using a code like this:
> main_window->cursor(FL_CURSOR_HAND);
> But it doesn't work.
>
> Could you give me suggestion about this problem?
You have not shown us enough context for your code, but I suspect that
you are trying to change the cursor type *before* the window actually
exists. That doesn't work on most system - you need to show() the window
and have it mapped by the WM before you can change its cursor
attribute...
------------------------------------
#include <FL/Fl.H>
#include <FL/Fl_Window.H>
#include <FL/fl_draw.H>
int main(int argc, char **argv) {
Fl_Window window(400,300);
window.resizable(window);
window.begin();
window.end();
// window.cursor(FL_CURSOR_HAND); this will not work - too soon!
window.show(argc,argv);
window.cursor(FL_CURSOR_HAND); // this does work
return Fl::run();
}
------------------------------------
> Is it in fltk the possibility to attach a jpeg to the cursor?
Not as such, no.
Matthias has a fltk add-on library for manipulating cursors that might
let you do that sort of thing, however.
But I can't remember what it is called now...
--
Ian
SELEX Sensors and Airborne Systems Limited
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14
3EL
A company registered in England & Wales. Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk