View Full Version : Mouse Clicking Help Me!!!!!!!!!!!!

01-15-2002, 07:47 PM
I've problem in mouse clicking.I want choose some points in the window using mouse clicking.But when I click the mouse it shows a point close to the cursor not at the tip of the cursor. I'm using
void MouseHandler(int button, int state, int Mx, int My)
float mx,my;

mx = -100.0 + ((float)Mx / 1000.0) * 200.0;
my = 100.0 - ((float)My / 1000.0) * 200.0;


Moreover If i want to changethe cursor as a cross when I choose a point and show the co-ordinate as well in 2D how can I do that?

01-15-2002, 10:28 PM
First of all, try to get more precise when asking questions. What OS are you using ??

Why you do all the -100(Mx/1000)*200 stuff ??

Doesn't your window has 100 for the left side and 100 as top ??

Doesn't your X (relative to the window) is just (ScreenX - WinLeft) ?