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 


um..C++ again

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
AwayTheWInd
Master Cheater
Reputation: 0

Joined: 11 Sep 2007
Posts: 450

PostPosted: Thu Apr 03, 2008 3:00 pm    Post subject: um..C++ again Reply with quote

how do u set an active window? im using this function:

HWND SetActiveWindow(HWND GunBound);

i includeed #include <Windows.h> and i get the error,

'SetActiveWindow': redefinition; different type modifiers.

someone help please?

_________________
Back to top
View user's profile Send private message
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Thu Apr 03, 2008 3:11 pm    Post subject: Reply with quote

Seriously, stop making new topics. Just reply in the same topic.
Your defining a new function Rolling Eyes

just include windows.h and call the function normally.

SetActiveWindow( hGunbound );

hGunbound is the handle to the window, Obviously for GunBound.
Use FindWindow to get the handle.

_________________
Back to top
View user's profile Send private message
AwayTheWInd
Master Cheater
Reputation: 0

Joined: 11 Sep 2007
Posts: 450

PostPosted: Thu Apr 03, 2008 3:14 pm    Post subject: Reply with quote

um..ok but i still get this error:

error C2065: 'hGunbound' : undeclared identifier

how should i declare it?

nvm i think i fixed it

_________________
Back to top
View user's profile Send private message
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Thu Apr 03, 2008 3:16 pm    Post subject: Reply with quote

Im starting to think your doing all this at random and you havn't really learned the basic's of C++...

define it like any other variable..

HWND hGunbound;

_________________
Back to top
View user's profile Send private message
HalfPrime
Grandmaster Cheater
Reputation: 0

Joined: 12 Mar 2008
Posts: 532
Location: Right there...On your monitor

PostPosted: Thu Apr 03, 2008 3:24 pm    Post subject: Reply with quote

I doubt he's been programming for more thana week or 2. Learn the basics before you try to do something sophisticated!
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Fri Apr 04, 2008 5:59 am    Post subject: Reply with quote

AwayTheWInd wrote:
um..ok but i still get this error:

error C2065: 'hGunbound' : undeclared identifier

how should i declare it?

nvm i think i fixed it


If you are asking questions like this to the reply you got above, you really need to go back and learn the basics of C++, such as syntax. This is something you should have known off hand right away.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
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