Program Example2;
{ Program to demonstrate the GetMouseButtons function. }
Uses mouse;
begin
InitMouse;
Writeln('Press right mouse button to exit program');
While (GetMouseButtons<>MouseRightButton) do
begin
gotoxy(1,1);
write(getmousex,',',getmousey);
end;
DoneMouse;
end.
No matter how much I move the mouse or click the right button, the
mouse cursor
position is displayed as 0,0 and the program won't end.
I am using Free Pascal for w32, my os is winxp.
It makes no difference whether I run it in a window or full screen,
the cursor
is visible and moves, in both, but the program doesn't seem to
acknowledge the
mouse.
The DetectMouse function tells me I have a 3 buttoned mouse which is
correct.
I am sure the solution must be something extremely simple, but I have
no idea
what it is.
I'm stuck. Please, give me some help.