GIDForums  

Go Back   GIDForums > Computer Programming Forums > C++ Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 16-Dec-2006, 15:11
mfm1983 mfm1983 is offline
New Member
 
Join Date: Nov 2006
Posts: 5
mfm1983 is on a distinguished road
Smile

Changing Text Colors Or Look In C++


Changing Text Colors Or Look In C++

Is there any way to make some of the text faded or grey in c++? The reason why I'm asking is because I want to make some options only accessible when previous options are selected and you return back to the previous menu? What I planned on doing was to disable options that were in that text so that you had to input other options first. If there is no way to make faded text or grey text in basic c++ code is there any way around what I want to do? Thanks in advance for responses.
  #2  
Old 16-Dec-2006, 20:14
davis
 
Posts: n/a

Re: Changing Text Colors Or Look In C++


Quote:
Originally Posted by mfm1983
Changing Text Colors Or Look In C++

Is there any way to make some of the text faded or grey in c++? The reason why I'm asking is because I want to make some options only accessible when previous options are selected and you return back to the previous menu? What I planned on doing was to disable options that were in that text so that you had to input other options first. If there is no way to make faded text or grey text in basic c++ code is there any way around what I want to do? Thanks in advance for responses.

The short answer is NO, there is no platform-independent way of accomplishing what you seek in C++. C++'s standard library provides nothing of this type.

The longer answer is that you may be able to use some platform-dependent code to accomplish what you seek, but since you do not mention your platform, there isn't much benefit to trying to answer your question without requiring us to support every possible platform where color displays and C++ are not mutually-exclusive options.


:davis:
  #3  
Old 17-Dec-2006, 11:18
mfm1983 mfm1983 is offline
New Member
 
Join Date: Nov 2006
Posts: 5
mfm1983 is on a distinguished road
Smile

Re: Changing Text Colors Or Look In C++


Sorry using Windows XP, c++, and using the compiler that microsoft made the 2005 express edition.
  #4  
Old 19-Dec-2006, 05:55
davis
 
Posts: n/a

Re: Changing Text Colors Or Look In C++


Quote:
Originally Posted by mfm1983
Sorry using Windows XP, c++, and using the compiler that microsoft made the 2005 express edition.

There is still no platform independent (standard way using C++) way to implement what you seek. You must use some kind of terminal control library/functions or you must use some kind of windowing system library/functions.

If you're using a console application, you may want to review ANSI.SYS to see if it will meet your needs, but it is rather "klunky" and not very well supported on non-DOS based systems.

If you're using a Windows application, you can modify your font colors (along with other font properties) and your pen colors if you are drawing. See the MSDN for details.


:davis:
  #5  
Old 19-Dec-2006, 06:27
Blake's Avatar
Blake Blake is offline
Member
 
Join Date: Nov 2005
Posts: 172
Blake will become famous soon enough

Re: Changing Text Colors Or Look In C++


http://www.codeproject.com/cpp/AddColorConsole.asp
 
 

Recent GIDBlogToyota - 2008 September Promotion by Nihal

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing font style and color of text in C bigkIDmarie C Programming Language 1 30-Jul-2006 09:20
Changing the text color of 1 record in a CListCtrl shvalb MS Visual C++ / MFC Forum 1 30-Sep-2005 08:50
changing caption of static text control Pandiani MS Visual C++ / MFC Forum 1 20-Sep-2004 01:38
CD burner wont burn!! robertli55 Computer Hardware Forum 1 18-Jun-2004 10:53
Yet another CD burner problem: Lite-On LSC-24082K Erwin Computer Hardware Forum 1 22-May-2004 11:28

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 15:55.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.