This thread should belong to WinAPI forum. Use ShowCursor() to change the visibility of the cursor. This is used in conjunction with SetCapture() and ReleaseCapture() in order to make a good mouse-over behaviour.
I recommend a similar code in your window procedure when hadling the WM_MOUSEMOVE message:
Code:
case WM_MOUSEMOVE:
GetCursorPos(&ptCurrentMousePosit);
if (!mCaptive)
{
SetCapture(hwnd);
ShowCursor(FALSE);
mCaptive = true;
}
else
{
if (WindowFromPoint(ptCurrentMousePosit) != hwnd)
{
ShowCursor(TRUE);
ReleaseCapture();
mCaptive = false;
}
}
break;
Choose your own place to declare the following used variables:
Code:
static bool mCaptive;
static POINT ptCurrentMousePosit;
Bye,