4 Replies - 431 Views - Last Post: 04 September 2009 - 05:26 PM Rate Topic: -----

#1 Shy Guy  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 25
  • Joined: 02-September 09

Changing visual options

Post icon  Posted 04 September 2009 - 03:35 PM

Well I'm trying to change the uh visual attributes of my first basic c++ program. I'm just looking on insight as to how I can change font, color, window background, etc.

Any help is much appreciated ^^

Is This A Good Question/Topic? 0
  • +

Replies To: Changing visual options

#2 jjl  Icon User is offline

  • Engineer
  • member icon

Reputation: 1074
  • View blog
  • Posts: 4,533
  • Joined: 09-June 09

Re: Changing visual options

Posted 04 September 2009 - 04:17 PM

are you just trying to change the color of the dos window?

#include <windows.h>
#include <iostream.h>
 
int main()
{
   SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), BACKGROUND_RED BACKGROUND_INTENSITY);SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), BACKGROUND_RED BACKGROUND_INTENSITY);

   
 
   return 0;
}



But i wouldnt focus on this, like i said before , get the fundamentals down then try to transition over into MFC or WIN32

This post has been edited by ImaSexy: 04 September 2009 - 04:20 PM

Was This Post Helpful? 0
  • +
  • -

#3 gabehabe  Icon User is offline

  • GabehabeSwamp
  • member icon




Reputation: 1382
  • View blog
  • Posts: 10,962
  • Joined: 06-February 08

Re: Changing visual options

Posted 04 September 2009 - 04:18 PM

Depends on the operating system. What're you using? :)

edit,
If you're using Windows, try this.


ImaSexy said:

#include <iostream.h>
NO!!!
#include <iostream> _ pet peeve right there.

.h is deprecated in standard C++ headers.

This post has been edited by gabehabe: 04 September 2009 - 04:19 PM

Was This Post Helpful? 0
  • +
  • -

#4 jjl  Icon User is offline

  • Engineer
  • member icon

Reputation: 1074
  • View blog
  • Posts: 4,533
  • Joined: 09-June 09

Re: Changing visual options

Posted 04 September 2009 - 04:25 PM

My bad i dont know why i put .h, I need to drink some coffee :blink:
Was This Post Helpful? 0
  • +
  • -

#5 Shy Guy  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 25
  • Joined: 02-September 09

Re: Changing visual options

Posted 04 September 2009 - 05:26 PM

Well yes changing color would be nice, but I was wondering if it was possible for me to change like the font or the window background or anything like that. :)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1