| View previous topic :: View next topic |
| Author |
Message |
kb3z0n Grandmaster Cheater
Reputation: 0
Joined: 13 Mar 2007 Posts: 542
|
Posted: Tue Feb 10, 2009 1:24 pm Post subject: Can anyone give me a FindWindow Example for C++ 2008? |
|
|
| Everytime i try, i keep getting errors that i cannot understand, can anyone give me an example?
|
|
| Back to top |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Tue Feb 10, 2009 1:46 pm Post subject: |
|
|
| post the errors, and the code.
|
|
| Back to top |
|
 |
Wiw3K Grandmaster Cheater
Reputation: 0
Joined: 09 Jul 2006 Posts: 762 Location: Poland.
|
Posted: Tue Feb 10, 2009 3:13 pm Post subject: |
|
|
#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 |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Tue Feb 10, 2009 3:21 pm Post subject: |
|
|
| 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 |
|
 |
hacksign23 Master Cheater
Reputation: 0
Joined: 26 Nov 2006 Posts: 404
|
Posted: Tue Feb 10, 2009 5:06 pm Post subject: |
|
|
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 |
|
 |
|