Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[C++] Timer Problem +rep for a fix(maybe)(its wierd)
Goto page Previous  1, 2
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
manc
Grandmaster Cheater
Reputation: 1

Joined: 16 Jun 2006
Posts: 551

PostPosted: Tue Sep 30, 2008 11:18 pm    Post subject: Reply with quote

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 Wink )

P.S. - Going to add you on Windows Messenger..

_________________
Back to top
View user's profile Send private message
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Tue Sep 30, 2008 11:24 pm    Post subject: Reply with quote

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
View user's profile Send private message
kitterz
Grandmaster Cheater Supreme
Reputation: 0

Joined: 24 Dec 2007
Posts: 1268

PostPosted: Wed Oct 01, 2008 7:45 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
manc
Grandmaster Cheater
Reputation: 1

Joined: 16 Jun 2006
Posts: 551

PostPosted: Thu Oct 02, 2008 9:16 pm    Post subject: Reply with quote

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
View user's profile Send private message
Travis13
Expert Cheater
Reputation: 0

Joined: 17 Feb 2007
Posts: 199

PostPosted: Thu Oct 02, 2008 9:18 pm    Post subject: Reply with quote

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 Smile check ur pm's

_________________
Learning C++, trying, failing, never gonna give up tho Razz
Back to top
View user's profile Send private message MSN Messenger
manc
Grandmaster Cheater
Reputation: 1

Joined: 16 Jun 2006
Posts: 551

PostPosted: Thu Oct 02, 2008 9:23 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites