Jump to content
  • Advertisement
Sign in to follow this  
Mastadex

Cursor visible in game

This topic is 4956 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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.hIcon         = LoadIcon(hInstance, IDI_APPLICATION);
    winClass.hIconSm       = LoadIcon(hInstance, IDI_APPLICATION);
    winClass.hCursor       = NULL;
    winClass.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);
    winClass.lpszMenuName  = NULL;
    winClass.cbClsExtra    = 0;
    winClass.cbWndExtra    = 0;

Share this post


Link to post
Share on other sites
Advertisement
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 this post


Link to post
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 this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!