Showing cursor in graphics.h

This is a discussion on Showing cursor in graphics.h within the A Brief History of Cprogramming.com forums, part of the Community Boards category; The graphics libary automattically hide the cusor. I was just wondering if there is any way to show the cursor ...

  1. #1
    Registered User
    Join Date
    Oct 2001
    Posts
    16

    Showing cursor in graphics.h

    The graphics libary automattically hide the cusor. I was just wondering if there is any way to show the cursor after you have decalred the graphics libary.

  2. #2
    Super Moderator
    Join Date
    Sep 2001
    Posts
    4,913
    Couldn't you just force the cursor to appear with a function? Or use the assembler code for it - place it between asm { ...} tags. Or you could get the Screen cooridinates of where the cursor should be, and put something else there at those coordinates - something that looks like the cursor - I think it has an ascii value somwhere near 170...

  3. #3
    Disagreeably Disagreeable
    Join Date
    Aug 2001
    Posts
    711
    The hardware cursor is only available in text mode. It's unavailable in graphics mode. However, like Sean said, you can make your own cursor with one of those block characters, or you can simply draw a filled rectangle where the cursor should be.

  4. #4
    Super Moderator
    Join Date
    Sep 2001
    Posts
    4,913
    Drawing the cursor everytime time might take a wile, so you're probably just better off using the ascii char.

  5. #5
    Disagreeably Disagreeable
    Join Date
    Aug 2001
    Posts
    711
    >Drawing the cursor everytime time might take a wile, so you're probably just better off using the ascii char.<

    Actually, it wouldn't make a difference in speed really as the BGI takes care of writing text mode text in its graphics modes.

    For example, try initializing graphics mode via the BIOS or just go straight to the VGA itself, and then try to cout or printf() something. It won't do anything.

  6. #6
    Super Moderator
    Join Date
    Sep 2001
    Posts
    4,913
    So even if you specify already defined constants like characters - it still takes the same time?

  7. #7
    I am the worst best coder Quantrizi's Avatar
    Join Date
    Mar 2002
    Posts
    644
    Not what I thought.

  8. #8
    Disagreeably Disagreeable
    Join Date
    Aug 2001
    Posts
    711
    >So even if you specify already defined constants like characters - it still takes the same time?<

    The "constants" are simply bitmaps. In the end, BGI is just drawing pixels, so yeah it takes roughly the same time.

  9. #9
    Super Moderator
    Join Date
    Sep 2001
    Posts
    4,913
    Oh...... yeah...... well actually that makes more sense!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Window not showing
    By Rare177 in forum Windows Programming
    Replies: 7
    Last Post: 06-25-2004, 05:38 AM
  2. VC++ IntelliSense (showing class members)
    By _Elixia_ in forum Tech Board
    Replies: 0
    Last Post: 08-02-2003, 01:14 PM
  3. graphics.h
    By ZachariahLee in forum C++ Programming
    Replies: 1
    Last Post: 02-05-2003, 05:05 PM
  4. graphics.h
    By Seti in forum C++ Programming
    Replies: 2
    Last Post: 02-28-2002, 03:11 PM
  5. graphics.h
    By AM in forum C Programming
    Replies: 2
    Last Post: 01-14-2002, 12:11 PM

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