Sign in to follow this  
Mastadex

Cursor visible in game

Recommended Posts

Mastadex    200
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
Unwise owl    158
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
ms291052    223
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this