| View previous topic :: View next topic |
| Author |
Message |
manc Grandmaster Cheater
Reputation: 1
Joined: 16 Jun 2006 Posts: 551
|
Posted: Tue Sep 30, 2008 11:18 pm Post subject: |
|
|
Ummm, havent tried it yet myself but I will look into it and get back to you around this time tommorow if no one else does by then...
(Have to sleep now )
P.S. - Going to add you on Windows Messenger..
_________________
|
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Tue Sep 30, 2008 11:24 pm Post subject: |
|
|
| Travis13 wrote: | | plz dont just say.....setconsoletextattribute or w/e cuz i got no clue wat to do with that....i need an example,,,,,PLZ AND TY (im so desperate for help :S) |
GetStdHandle
SetConsoleTextAttribute
| Code: | #include <iostream>
#include <windows.h>
int main()
{
HANDLE h = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleTextAttribute(h, FOREGROUND_GREEN | FOREGROUND_INTENSITY | BACKGROUND_RED);
std::cout << "Mic test, one, two, three.";
std::cin.sync();
std::cin.ignore();
return 0;
} |
|
|
| Back to top |
|
 |
kitterz Grandmaster Cheater Supreme
Reputation: 0
Joined: 24 Dec 2007 Posts: 1268
|
Posted: Wed Oct 01, 2008 7:45 pm Post subject: |
|
|
Oh and if you do what i say, it will be fixed...also thre is one more problem
The function timer() is in an infinite loop, and the program is only running on one thread. (meaning only 1 thing can be done at a time). This is why it does not either stop the timer or close...it is still and always stuck only doing the timer.
To solve the problem, use CreateThread()
| manc wrote: | slovach saves the day, rep him instead.
as far as loops go,
do = while ????? |
it is another way to do a while loop. This way, though, it does the code at least once, then checks the statement.
_________________
|
|
| Back to top |
|
 |
manc Grandmaster Cheater
Reputation: 1
Joined: 16 Jun 2006 Posts: 551
|
Posted: Thu Oct 02, 2008 9:16 pm Post subject: |
|
|
i think when you use setconsoletextattribute(blah blah) it sets everything to that color, but u can always set each line individually to a specific color by changing the parameters
_________________
|
|
| Back to top |
|
 |
Travis13 Expert Cheater
Reputation: 0
Joined: 17 Feb 2007 Posts: 199
|
Posted: Thu Oct 02, 2008 9:18 pm Post subject: |
|
|
| manc wrote: | | i think when you use setconsoletextattribute(blah blah) it sets everything to that color, but u can always set each line individually to a specific color by changing the parameters |
sorry im so new to all this c++ stuff i dont really know wat parameteres mean and all that crap.....its so confusing when ppl show me all that Handle...LParam...DWORD.....all those weird words where i have no clue wat it means :S........btw please add me on msn check ur pm's
_________________
Learning C++, trying, failing, never gonna give up tho  |
|
| Back to top |
|
 |
manc Grandmaster Cheater
Reputation: 1
Joined: 16 Jun 2006 Posts: 551
|
Posted: Thu Oct 02, 2008 9:23 pm Post subject: |
|
|
| Travis13 wrote: | | manc wrote: | | i think when you use setconsoletextattribute(blah blah) it sets everything to that color, but u can always set each line individually to a specific color by changing the parameters |
sorry im so new to all this c++ stuff i dont really know wat parameteres mean |
Parameters are what are inside the () after a function like
| Code: | | SetConsoleTextAttribute(h, FOREGROUND_GREEN | FOREGROUND_INTENSITY | BACKGROUND_RED); |
the stuff like h, FOREGREOUND..BACKGROUND... and all that are the paremeters - the stuff inside the parantheses
and ill add you sometime this weekend, super busy lately..
_________________
|
|
| Back to top |
|
 |
|