943,865 Members | Top Members by Rank

Ad:
  • C Discussion Thread
  • Unsolved
  • Views: 2180
  • C RSS
Jun 12th, 2009
0

Set font size in C program

Expand Post »
Hi,

Is it possible to display the output of a C program in different font sizes by setting it in the code? If yes, please guide regarding the same.

Thanks.
Similar Threads
Reputation Points: 10
Solved Threads: 2
Newbie Poster
iceman29 is offline Offline
12 posts
since Feb 2008
Jun 12th, 2009
0

Re: Set font size in C program

Depends, if you mean using the Win32 API, then it's easily possible. AFAIK it's not possible to set the font size on the console through just using C++ code.
Reputation Points: 1429
Solved Threads: 129
Posting Virtuoso
William Hemsworth is offline Offline
1,542 posts
since Mar 2008
Jun 12th, 2009
0

Re: Set font size in C program

Use some graphics library.
Reputation Points: 17
Solved Threads: 16
Junior Poster
s_sridhar is offline Offline
139 posts
since Mar 2009
Jun 12th, 2009
0

Re: Set font size in C program

>Use some graphics library.
There's not much point in recommending that, we first need to know some details before simply telling him to use a graphics library. If he's using the Win32 API, he can simply use CreateFont and use the returned object with the window HDC.

If he plans on doing this with a console window, then there's problems.
Reputation Points: 1429
Solved Threads: 129
Posting Virtuoso
William Hemsworth is offline Offline
1,542 posts
since Mar 2008
Jun 12th, 2009
0

Re: Set font size in C program

Depends, if you mean using the Win32 API, then it's easily possible. AFAIK it's not possible to set the font size on the console through just using C++ code.
I am working on UNIX, and using CC to compile the code.
Reputation Points: 10
Solved Threads: 2
Newbie Poster
iceman29 is offline Offline
12 posts
since Feb 2008
Jun 12th, 2009
0

Re: Set font size in C program

Click to Expand / Collapse  Quote originally posted by iceman29 ...
I am working on UNIX, and using CC to compile the code.
Wouldn't it be terminal dependent? something to do with termcap settings? (Just guessing, its been 15 or so years since I worked with *nix).
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Ancient Dragon is offline Offline
21,951 posts
since Aug 2005
Jun 12th, 2009
0

Re: Set font size in C program

Then, i believe you can't use graphics library. Only for console applications.
Reputation Points: 17
Solved Threads: 16
Junior Poster
s_sridhar is offline Offline
139 posts
since Mar 2009
Aug 12th, 2010
0
Re: Set font size in C program
its so easy!!!!
Reputation Points: 8
Solved Threads: 0
Newbie Poster
shielaborja is offline Offline
2 posts
since Aug 2010
Aug 12th, 2010
0
Re: Set font size in C program
Quote ...
its so easy!!!!
Ok smartass if its so easy then prey tell us the answer.
Last edited by Ancient Dragon; Aug 12th, 2010 at 9:14 am.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Ancient Dragon is offline Offline
21,951 posts
since Aug 2005
Aug 12th, 2010
3
Re: Set font size in C program
Quote ...
its so easy!!!!
It's the I-know-the-answer-but-I-won't-tell syndrome.
It generally happens to people who suffer from I-don't-know-the-answer

Don't be too hard on him...
Reputation Points: 71
Solved Threads: 10
Junior Poster
xavier666 is offline Offline
147 posts
since Sep 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C Forum Timeline: Access Violation when calling a DLL function
Next Thread in C Forum Timeline: Problem Converting String to Float - Using ATOF





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC