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 


Can anyone give me a FindWindow Example for C++ 2008?

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

Joined: 13 Mar 2007
Posts: 542

PostPosted: Tue Feb 10, 2009 1:24 pm    Post subject: Can anyone give me a FindWindow Example for C++ 2008? Reply with quote

Everytime i try, i keep getting errors that i cannot understand, can anyone give me an example?
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 Feb 10, 2009 1:46 pm    Post subject: Reply with quote

post the errors, and the code.
Back to top
View user's profile Send private message
Wiw3K
Grandmaster Cheater
Reputation: 0

Joined: 09 Jul 2006
Posts: 762
Location: Poland.

PostPosted: Tue Feb 10, 2009 3:13 pm    Post subject: Reply with quote

#include <windows.h>
int main()

{
HWND Calc;
Calc = FindWindow(NULL, "Calculator");
SetWindowText(Calc, "TEH WINZORZ"); //just a bit of fun lol
Calc = 0;
return (0);
}
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 Feb 10, 2009 3:21 pm    Post subject: Reply with quote

Code:
#include <Windows.h>

int main(){
   HWND h = FindWindow(NULL, "Calculator"); //or use 'SciCalc' as your class.
   SetWindowText(h, "Horsecock.MPEG");
   return 0;
}
Back to top
View user's profile Send private message
hacksign23
Master Cheater
Reputation: 0

Joined: 26 Nov 2006
Posts: 404

PostPosted: Tue Feb 10, 2009 5:06 pm    Post subject: Reply with quote

it gives you some kind of weird shit error in VC++ using CLR code so i switched to unmanaged C++. To get the process hwnd/handle or something, look into System::Diagnostics.

kkthxbai

_________________
Back to top
View user's profile Send private message AIM Address
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