How do you get rid of the cursor

This is a discussion on How do you get rid of the cursor within the C++ Programming forums, part of the General Programming Boards category; Im having a problem making a game. The code works fine its just that the damn cursor keeps blinking, and ...

  1. #1
    Registered User
    Join Date
    Nov 2003
    Posts
    7

    How do you get rid of the cursor

    Im having a problem making a game. The code works fine its just that the damn cursor keeps blinking, and its getting very annoying. Anyone know how to get rid of it?

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    I'll save myself asking what system you use and assume Windows:
    Code:
    #include <windows.h>
    
    void hide_cursor()
    {
      CONSOLE_CURSOR_INFO cci;
      cci.dwSize = 1;
      cci.bVisible = FALSE;
      SetConsoleCursorInfo ( GetStdHandle( STD_OUTPUT_HANDLE ), &cci );
    }
    My best code is written with the delete key.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Custom Animated Cursor
    By willc0de4food in forum Windows Programming
    Replies: 3
    Last Post: 05-13-2005, 11:05 PM
  2. BGI and text cursor
    By Somnambulist in forum C++ Programming
    Replies: 4
    Last Post: 01-21-2004, 07:54 PM
  3. cursor question
    By GodLike in forum Windows Programming
    Replies: 3
    Last Post: 05-09-2002, 07:14 PM
  4. cursor remains in openGL fullscreen
    By Ken Fitlike in forum Game Programming
    Replies: 5
    Last Post: 03-14-2002, 08:52 PM
  5. Mouse in 800x600 24Bit Mode?
    By Unregistered in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 11-11-2001, 01:38 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21