Original Post
How do you guys find the mouse cursor position in your opengl windows?
HWND Hwnd;
POINT Cursor;
RECT Rect;
int x,y;
int mx,my;
char mouse[10];
GetCursorPos(&Cursor);
Hwnd = GetForegroundWindow();
GetClientRect(Hwnd,&Rect);
mx = (int)Cursor.x - (int)Rect.left;
my = (int)Cursor.y - (int)Rect.top;
sprintf(mouse,"%d,%d",mx,my);
MessageBox(NULL,mouse,APPNAME,MB_OK);