Cursor visible in game

Recommended Posts

Im trying to get rid of the cursor from appearing in my game. I set the hCurses flag to NULL but it still apears. Here is my init stuff:
    winClass.lpszClassName = "Atomix3D";
winClass.cbSize        = sizeof(WNDCLASSEX);
winClass.style         = CS_HREDRAW | CS_VREDRAW;
winClass.lpfnWndProc   = WindowProc;
winClass.hInstance     = hInstance;
winClass.hCursor       = NULL;
winClass.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);
winClass.cbClsExtra    = 0;
winClass.cbWndExtra    = 0;


Share on other sites
Use ShowCursor(FALSE); or something (I don't remember if you had to pass the window handle as the first argument or not). I believe the NULL part implies the default cursor.

Share on other sites
Yes you should use ShowCursor(FALSE) [alone], which is a windows function, as well as IDirect3DDevice9::ShowCursor(FALSE) which is the D3D version. No hWnd need in either.

Share on other sites
Thanks that fixed it :)

Create an account

Register a new account

• Forum Statistics

• Total Topics
628334
• Total Posts
2982147

• 9
• 24
• 9
• 9
• 13