I'm having trouble with GetCursorXPosition/GetCursorYPosition.
Clicking on the panel definitely registers, but I'm getting null values
returned for x, y, px & py.
Regardless of whether I do it in an if (as in the example below) or as a
function EventHandler(), I am still getting nothing returned from the
GetCursorPosition.
Any ideas what might be going astray here?
Thanks in advance
if( GetCursorMouseButtons() & 1)
{
// retrieve co-ordinates in date/value units
x = GetCursorXPosition(0);
y = GetCursorYPosition(0);
// retrieve co-ordinates in pixel units
px = GetCursorXPosition(1);
py = GetCursorYPosition(1);
// Convert the xy coordinates into Row Column coordinates
MouseCol = floor( px / CellWidth );
MouseRow = floor( py / CellHeight );
printf("Left mouse button is pressed down\n");
printf("MC " + MouseCol + " BC " + ButtonCol + " MR " + MouseRow + " BR
" + ButtonRow + "\n");
printf("x " + x + " y " + y + "\n");
printf("px " + px + " py " + py + "\n");
}