getcursorpos daje mi współżedne ale z pulpitu jak je zamienic na te z mojego okna ?
0
0
dodaj do wsp. formatki
0
POINT Point;
RECT Rect;
GetCursorPos(&Point);
GetWindowRect(hWnd,&Rect);
int WndPosX = Point.x - Rect.left;
int WndPosY = Point.y - Rect.top;
if(WndPosX<0 || WndPosY<0)
{
//kursor poza oknem
}
0
GetCursorPos(&Point);
ScreenToClient(hwnd, &Point);