| View previous topic :: View next topic |
| Author |
Message |
AwayTheWInd Master Cheater
Reputation: 0
Joined: 11 Sep 2007 Posts: 450
|
Posted: Thu Apr 03, 2008 3:00 pm Post subject: um..C++ again |
|
|
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 |
|
 |
lurc Grandmaster Cheater Supreme
Reputation: 2
Joined: 13 Nov 2006 Posts: 1900
|
Posted: Thu Apr 03, 2008 3:11 pm Post subject: |
|
|
Seriously, stop making new topics. Just reply in the same topic.
Your defining a new function
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 |
|
 |
AwayTheWInd Master Cheater
Reputation: 0
Joined: 11 Sep 2007 Posts: 450
|
Posted: Thu Apr 03, 2008 3:14 pm Post subject: |
|
|
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 |
|
 |
lurc Grandmaster Cheater Supreme
Reputation: 2
Joined: 13 Nov 2006 Posts: 1900
|
Posted: Thu Apr 03, 2008 3:16 pm Post subject: |
|
|
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 |
|
 |
HalfPrime Grandmaster Cheater
Reputation: 0
Joined: 12 Mar 2008 Posts: 532 Location: Right there...On your monitor
|
Posted: Thu Apr 03, 2008 3:24 pm Post subject: |
|
|
| 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 |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Fri Apr 04, 2008 5:59 am Post subject: |
|
|
| 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 |
|
 |
|