Changing console applications cursor?

This is a discussion on Changing console applications cursor? within the C++ Programming forums, part of the General Programming Boards category; How is it possible to change the cursor in console applications? I normally use LoadCursor for windows applications. But is ...

  1. #1
    kevinawad
    Guest

    Changing console applications cursor?

    How is it possible to change the cursor in console applications?

    I normally use LoadCursor for windows applications. But is there any way to do it in console applications?

  2. #2
    Registered User
    Join Date
    Oct 2008
    Posts
    60
    Perhaps:
    Code:
      HCURSOR hcursor = LoadCursorFromFile( "cursor.cur");
      SetCursor( hcursor);

  3. #3
    kevinawad
    Guest
    Doesn't work...i already tryed this before.

    But i used

    Code:
     HCURSOR Cursor = LoadCursor(NULL, IDC_HAND);

  4. #4
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Posts
    21,134
    A tip:
    If your code fails, post the error. What function fails? What does it return? What does GetLastError return?
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.
    For information on how to enable C++11 on your compiler, look here.
    よく聞くがいい!私は天才だからね! ^_^

  5. #5
    pronounced 'fib' FillYourBrain's Avatar
    Join Date
    Aug 2002
    Posts
    2,298
    isn't the HCURSOR specifically for the mouse cursor? I thought you were looking for terminal cursor. (or 'caret' I think)
    Last edited by FillYourBrain; 11-07-2008 at 01:32 PM.
    "You are stupid! You are stupid! Oh, and don't forget, you are STUPID!" - Dexter

  6. #6
    kevinawad
    Guest
    Error 0

  7. #7
    Registered User
    Join Date
    Oct 2008
    Posts
    60
    If LoadCursor returned zero, then it didn't load the cursor.
    At any rate, I can't get it to work either. No error but no go.
    Do you get the arrow-with-hourglass thingy for a few seconds when it starts up? I wonder what's up with that?

  8. #8
    kevinawad
    Guest
    Hmmm? Does anyone else know what's the problem?

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, 10:05 PM
  2. Changing cursor VC++
    By Da-Nuka in forum Windows Programming
    Replies: 7
    Last Post: 02-24-2005, 02:43 PM
  3. Hiding the Console Cursor
    By XSquared in forum C Programming
    Replies: 1
    Last Post: 08-29-2003, 12:52 AM
  4. colors in DOS console based applications
    By Unregistered in forum C++ Programming
    Replies: 2
    Last Post: 06-09-2002, 10:37 PM
  5. win32 apps compiled with GCC start console window!
    By Citrus538 in forum Windows Programming
    Replies: 5
    Last Post: 02-18-2002, 09:35 PM

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