473,396 Members | 1,771 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Changing font color

Ali Rizwan
925 512MB
How can i change font color and background color in c or c++.
Plz give an example .

Thanx
Nov 15 '07 #1
4 2852
weaknessforcats
9,208 Expert Mod 8TB
C and C++ has nothing to do with color.

Font color is part of a graphical operating system, like Windows.

For Windows, you change the font color by creating a pen that draws the text in the color you specify in a COLORREF.
Nov 15 '07 #2
weaknessforcats
9,208 Expert Mod 8TB
The background color for Windows is chnaged by SetBkColor.
Nov 15 '07 #3
Ali Rizwan
925 512MB
No.
I have studied such thing a 2 years ago.
We have changed our font color as well as background colors.
And these functions are defined in conio.h
But i don't remember these functions now.
I think these are Backcolor or backgroundcolor
And Forecolor or font color
Such like this.

But don't know the actual.

Thanx
Nov 15 '07 #4
weaknessforcats
9,208 Expert Mod 8TB
I never use conio.h.

It is non-portable and non-ANSI.
Nov 15 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Cengiz Ulku | last post by:
Hi all, I know now how to change the font name of a RTF file in a RTB control using, for example: RTextBox1.SelFontName = cmbFonts.Text I have a RTF file -created with Word- displayed in a...
0
by: Paul D. Sullivan | last post by:
I've been trying to find out how to increase the font size in the text entry fields in Invision Power Board 1.3 for a while. The part where you enter your post and do the quick reply and all that...
6
by: Ioannis Demetriades | last post by:
Hi, I need to change the printer's font to "control" -a printer font, and then send a sequence of characters to the printer. My problem is that I cannot change the printer's font. Can this be...
3
by: Sakharam Phapale | last post by:
Hi All, I am using a richTextBox control for text editing purpose. I have written following procedure which change the font style of richTextBox. Dim f as font = rtbData.selectionFont() ...
7
by: Sakharam Phapale | last post by:
Hi All, How to preserve the old font properties while changing new one? I posted same question 2 months back, but I had very small time then. eg. "Shopping for" is a text in RichTextBox and...
15
by: mart2006 | last post by:
Hi, This is probably really simple to most of you but I have a PHP based website that I want to change the font (of the outputted HTML) and I'm really struggling! Here is a snippet of my code: ...
15
by: phillip.s.powell | last post by:
<style> div div table tr td a.navbar, div div table tr td font {display: none;} </style> <div class="navigationbar" style="background-color:Black; position: absolute; left:50%; top:127px;...
1
by: Blasting Cap | last post by:
I am having trouble changing the font for a PushButton control in a datagrid button column. I have seen several posts refer to styles and simple changes to the HTML for font changes but most of...
0
by: nitehawk416 | last post by:
I want to change the font of my rich text box to a font I downloaded. In the properties the font isn't there, so I tried changing it through the code with this variable declaration Font MUDFONT =...
4
by: gubbachchi | last post by:
Hi all, Please anybody help me solve this problem. I am stuck up with this from past 2 weeks. I am developing an application where, when the user selects date from javascript datepicker and enters...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.