How to add mouse events to wxBitmap Topic is solved

If you are using wxDev-C++ for your wxWidgets design, please ask your questions here instead of in IDE Related.
Post Reply
haroldjpa
Knows some wx things
Knows some wx things
Posts: 25
Joined: Mon Oct 16, 2006 11:43 pm

How to add mouse events to wxBitmap

Post by haroldjpa »

Hello all

In wxdevcpp How to add mouse events to wxBitmap ?? ( doubleclick, mousemove, mouseup mousedown )



Hola Como hago para agregarle Eventos de mouse a el objeto wxBitmap??


Gracias
upCASE
Moderator
Moderator
Posts: 3176
Joined: Mon Aug 30, 2004 6:55 am
Location: Germany, Cologne

Re: How to add mouse events to wxBitmap

Post by upCASE »

haroldjpa wrote:In wxdevcpp How to add mouse events to wxBitmap ?? ( doubleclick, mousemove, mouseup mousedown )
You can't. wxBitmap is not a control that could receive events, but a representation of image data to be saved/loaded/drawn.
To do something like that you'll need to create your own control that handles this. Try here for a start: http://de.geocities.com/markusgreither/resizec.htm
OS: OpenSuSE, Ubuntu, Win XP Pro
wx: svn
Compiler: gcc 4.5.1, VC 2008, eVC 4

"If it was hard to write it should be hard to read..." - the unknown coder
"Try not! Do. Or do not. There is no try." - Yoda
upCASE
Moderator
Moderator
Posts: 3176
Joined: Mon Aug 30, 2004 6:55 am
Location: Germany, Cologne

Post by upCASE »

I forgot: Another option is using wxDragImage
OS: OpenSuSE, Ubuntu, Win XP Pro
wx: svn
Compiler: gcc 4.5.1, VC 2008, eVC 4

"If it was hard to write it should be hard to read..." - the unknown coder
"Try not! Do. Or do not. There is no try." - Yoda
Post Reply