Re: wxEuphoria setMousePointer

new topic     » goto parent     » topic index » view thread      » older message » newer message

Matt Lewis wrote:
> 
> Erik-Jan van Kampen wrote:
> > 
> > Is there an equivalent of Win32Lib's setMousePointer() procedure in
> > wxEuphoria?
> > 
> > I just downloaded the latest version of wxEuphoria, but I could not find it
> > anywhere. If it isn't there, will it be difficult to add it?
> 
> It is there, just really, really poorly documented.  You need to create a
> wxCursor (which you can find in the docs under Classes), and then use
> set_cursor( window, cursor ) (which isn't documented at all).  I'll add the
> docs for set_cursor() to Controls for the next release.
>  
> > I also noticed that the client.exw and server.exw demos crash because of a
> > small
> > commenting error on line 1411 in wxNet.e
> 
> Thanks, I'll get that fixed for the next release.
> 
> 
> > I really like what I have seen about wxEuphoria so far and if I can get the
> > mousepointer thing to work, I will try to convert my EuSudoku game from
> > Win32Lib
> > to wxEuphoria, so it will be cross-platform.
> > 
> 
> Thanks.  Please let me know if you find anything else that you think is
> missing
> or wrong.
> 
> Matt Lewis


Thanks for you quick reply Matt.

I have found the set_cursor function and was able to change the cursor into one
of the predefined cursors, without problems.

Next I would like to create a custom cursor, for example from xpm data. After
some research in the wxwidgets manuals, I know there is a constructor for the
wxCursor class that takes a wxImage as an argument. A wxImage can be created from
a wxBitmap using wxBitmap::ConverToImage().

From the connect4_game.exw demo I know how to create a wxBitmap from xpm data,
 but I can't figure out how to convert the wxBitmap to a wxImage and then to a
 wxCursor in wxEuphoria.

What's the best approach to get this done in wxEuphoria?

Erik-Jan

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu