Another newbie question.

This is a discussion on Another newbie question. within the C++ Programming forums, part of the General Programming Boards category; Is there a way that I could use the keyboard to navagate a list of options? For example if this ...

  1. #1
    1479
    Join Date
    Aug 2003
    Posts
    253

    Another newbie question.

    Is there a way that I could use the keyboard to navagate a list of options? For example if this was output on the screen:

    1.Start
    2.Play
    3.exit

    Could I possible get a box of gray that highlights the first option and then be able to use the keyboard arrows to move it up and down?
    Knowledge is power and I want it all

    -0RealityFusion0-

  2. #2
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    Yes and yes. The background colour stuff is covered in part 4 of my tutorial here, and handling keyboard events, (and mouse events incidently), is covered in part 5.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  3. #3
    Registered User
    Join Date
    Apr 2003
    Posts
    2,662
    Hi adrianxw,

    That's an interesting tutorial. I have one question so far. You said:

    "By default, Windows places the path of the executable in the window title. "

    I don't see that. I use VC++ 6, and I just get the name of the program in the title bar, e.g "test". The full path name to my .exe file is:

    C:\Beginning C++\test\Degug\test.exe

    I tried running my program from the command prompt(Start->Programs->MSDOS window) and then cd'ing to the relevant directory, but the title bar of that DOS window is MSDOS-Prompt and it doesn't change when I run a "hello world" program, and in that case even when I set the title myself using SetConsoleTitle(), it still says MSDOS-Prompt.

    How can I see that default behavior?
    Last edited by 7stud; 08-20-2003 at 06:21 AM.

  4. #4
    1479
    Join Date
    Aug 2003
    Posts
    253
    The link is not working for me
    Knowledge is power and I want it all

    -0RealityFusion0-

  5. #5
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    >>> The link is not working for me

    I posted a note on my home page about planned downtime today, and possibly tomorrow to upgrade my network hardware. I also seem to be having a brand new problem with my DNS provider, but their e-mail is bouncing me, and their contact page is 404'ing, so I can't do anything about that right now.

    If it looks like it's going to take a while, I'll create a sub-domain on my wifes site to link to mine.

    Sorry for the inconvenience, I'm as ........ed off about it as you believe me.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  6. #6
    Registered User
    Join Date
    Apr 2003
    Posts
    2,662
    adrianxw,

    When you have time could you look at my previous post?

  7. #7
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    >>> When you have time could you look at my previous post?

    Sorry, didn't notice it, have been somewhat busy today.

    >>> How can I see that default behavior?

    Don't know. The behaviour is what it does for me on all my system's from Win95 - WinXP. If I get a minute I'll have a closer look.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  8. #8
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    My site is temporarily available here.

    *** EDIT ***

    It's back where it should be now.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  9. #9
    Registered User
    Join Date
    Mar 2002
    Posts
    249
    You guys have to learn how to use Google's cached snapshot of page. Can't live w/o it.
    Well, there are a few things wrong with your code:

    1) It does not work.
    2) It does not work.
    3) It does not work.

    Hope this helps.

  10. #10
    Registered User
    Join Date
    Apr 2003
    Posts
    2,662
    I am using Windows 98 and MSVC++ 6.0, if that helps.

    I think somehow when I set up MSVC++6.0 the directory:

    C:\Beginning C++\

    was designated as the current directory even though my compiler is in the directory:

    C:\Program Files\C++ Microsoft Visual Studio

    (Although, I can't find that setting anywhere.)

    So, does it make sense when I run programs inside VC++ 6 that the title bar only shows the folder name "test"? The full path to the .exe file is:

    C:\Beginning C++\test\Debug\test.exe
    Last edited by 7stud; 08-20-2003 at 03:11 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Stupid Newbie question
    By TimL in forum C++ Programming
    Replies: 4
    Last Post: 07-22-2008, 05:43 AM
  2. C prog newbie question
    By Draginzuzu in forum C Programming
    Replies: 1
    Last Post: 02-03-2003, 06:45 PM
  3. a stupid question from a newbie
    By newcomer in forum C++ Programming
    Replies: 4
    Last Post: 01-11-2003, 04:38 PM
  4. confusion with integers (newbie question)
    By imortal in forum C Programming
    Replies: 7
    Last Post: 12-06-2002, 04:09 PM
  5. newbie class templates question
    By daysleeper in forum C++ Programming
    Replies: 2
    Last Post: 09-18-2001, 10:50 AM

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