Re: how to change mouse cursor



neeraj sharma wrote:

> How can
> I change my mouse pointer when it is over a button and
> how when an application is opened.One more thing In
> gtk can we find out if an application is running or
> not.


You need to use a gdk_cursor. Something like:

   GdkCursor *cursor = gdk_cursor_new( GDK_TOP_LEFT_ARROW );
   gdk_window_set_cursor( GTK_WIDGET( button )->window, cursor );

grep the gtk sources for examples.

Finding out whether an application is running is hard to do well in way 
that will work on any platform. If you're using a linuxy unix, you could 
try something simple like (untested):

   if( system( "ps ax | grep -q foo" ) == 0 ) )
     its_running();

This will be slow and unreliable, but might be good enough.

John



========================================================== 
Renaissance Autumn at the National Gallery 
A season of exhibitions, displays and events with a Renaissance theme. 

Pisanello: Painter to the Renaissance Court (24 October - 13 January 2002) 

For information and tickets: 
http://www.nationalgallery.org.uk/what/news/ren_autumn.htm



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]