RE: Mouse clicks on bitmaps
- Posted by Brian Broker <bkb at cnw.com> Jun 28, 2004
- 424 views
Are you using a bitmap control or are you using a pixmap? Does your bitmap change size? Does the origin of the bitmap/pixmap change?Writing a w32HMouse handler might be a better option since it's params include the mouse position. -- Brian Jonas Temple wrote: > > > posted by: Jonas Temple <jtemple at yhti.net> > > I know this question has been asked in the past and I searched the > archive > for any related messages, but could not find the answer. > > How do I get or simulate a left mouse click in a bitmap? My current > attempt is to set a HClick handler for the main window and then try > to determine if the click was in the bounds of the bitmap. > > If this is the correct approach then question two is: > How do I accurately determine if the mouse is in the bitmap regardless > of the size of the window? I've been experimenting with > getPointerPos(), > getPointerRelPos() and isScreenPointIn() but I can't get consistent > results. > > Well, it's late and I need sleep.... > > Jonas