case WM_MOUSEMOVE:
if (wParam & MK_LBUTTON)
{
RECT WindowRect;
POINT CursorPos;
GetWindowRect(hwnd, &WindowRect);
GetCursorPos(&CursorPos);
SetWindowPos(hwnd, 0, WindowRect.left - CursorPos.x, WindowRect.top - CursorPos.y, 291, 157, 0);
}
break;
Hey Guys The above code isn't working for me. I'm trying to have the user Drag my borderless window but the thing just jumps to the 0, 0 immediately! Can someone explain why? Or what I should do?