Hi! I guess you'll have multiple choices. Well, at least two :) 1. Let the toplevel window (on which you paint the image) handle wxMouseEvents. 2. Write a "Canvas" (like a panel where you draw on) class and let this window handle the events.
1. I wouldn't recommend that solution. You'd have to get and inspect the XY coordinates to see if the mouse was inside your image. 2. Write a wxPanel derived Canvas class, resize it to the image size, let it handle EVT_ENTER_WINDOW and EVT_LEAVE_WINDOW events. That way you'll know if the mouse is over your image or not.
upCASE ----------------------------------- If it was hard to write, it should be hard to read!- Do. Or do not. There is no try! |