On May 21, 3:04 am, Sam Hu <SamHu.Sa...@gmail.com> wrote:
> I am always wondering,in many console apps I have ever
> seen,how one can make this in C++:
> 1.password mask "*",when one is asked to enter the password ,say
> "1234",it displays "****";
> 2.progress indidating.say when one want to show the completeness by
> percentage of the current task going,other than showing below
> information:
> copying files 5% completed.
> copying files 6% completed.
> ....
> how one just let show in a single line:
> copying files xx% completed
> only the percentage is increasing or decreasing in certain interval.
> 3.how to ask the user to input in a fixed position,say below prompt
> from an app:
> your name is ____ and you are __ years old.
> The cursor is exact at the postion after "is ".
> when the user input a string and hit some key,the cursor is re-
> positioned at the point exact after "are ".Another word,something like
> the BIOS setup ultility.
None of the above is supported by standard C++. Typically,
you'll either need something platform specific, or a portable
library---ncurses is almost a standard for this sort of thing.
> 4.someone told me that one can play a music/song on the keyboard,how?
Who knows? The machines I usually work on don't have any such
possibility (the only sound they support is the beep from the
keyboard), and it's not supported by C++.
> 5.how to create a menu just like the BIOS setup ultility?
ncurses? (I don't really know what the BIOS setup utility menu
looks like.)
> 6.how to display an icon/logo,just like the one Norton Ghost does.
You need to use the GUI. Again, implementation dependent, or an
external library (wxWidgets, etc.).
--
James Kanze (GABI Software) email:
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34
|