| View previous topic :: View next topic |
| Author |
Message |
hacksign23 Master Cheater
Reputation: 0
Joined: 26 Nov 2006 Posts: 404
|
Posted: Thu Jan 29, 2009 6:10 pm Post subject: Get hWnd of self C++ |
|
|
So then I want to get the hWnd of the main program aka the program I'm running.
Any ideas? thanks
oh, in C++ native. thanks!
_________________
|
|
| Back to top |
|
 |
lurc Grandmaster Cheater Supreme
Reputation: 2
Joined: 13 Nov 2006 Posts: 1900
|
Posted: Thu Jan 29, 2009 6:12 pm Post subject: |
|
|
Well if you're using a Dialog, or a window created by CreateWindowEx (After registering a class via RegisterClassEx) you should have a Windows Procedure that contains the hWnd, and if you used CreateWindowEx you should have the return of that, and not only that you'll already know the class name and such seeing as you registered the class, meaning you can just use FindWindow
_________________
|
|
| Back to top |
|
 |
hacksign23 Master Cheater
Reputation: 0
Joined: 26 Nov 2006 Posts: 404
|
Posted: Thu Jan 29, 2009 6:20 pm Post subject: |
|
|
ahh i'm using console, but the title name is always my location of where the program is, so i want like the output hwnd. thanks!
_________________
|
|
| Back to top |
|
 |
sponge I'm a spammer
Reputation: 1
Joined: 07 Nov 2006 Posts: 6009
|
Posted: Thu Jan 29, 2009 6:42 pm Post subject: |
|
|
I'm assuming this is what you mean by "output handle".
_________________
|
|
| Back to top |
|
 |
hacksign23 Master Cheater
Reputation: 0
Joined: 26 Nov 2006 Posts: 404
|
Posted: Thu Jan 29, 2009 7:22 pm Post subject: |
|
|
yea, i know std_output_handle, but that's a handle. unless there's a way to convert it to a hwnd, i need it as a hwnd because i'm using SetWindowText(*hwnd here*, (LPCSTR) "blabla");
_________________
|
|
| Back to top |
|
 |
lurc Grandmaster Cheater Supreme
Reputation: 2
Joined: 13 Nov 2006 Posts: 1900
|
Posted: Thu Jan 29, 2009 7:49 pm Post subject: |
|
|
SetConsoleTitle
_________________
|
|
| Back to top |
|
 |
BirdsEye Advanced Cheater
Reputation: 0
Joined: 05 Apr 2008 Posts: 94
|
|
| Back to top |
|
 |
lurc Grandmaster Cheater Supreme
Reputation: 2
Joined: 13 Nov 2006 Posts: 1900
|
Posted: Thu Jan 29, 2009 10:02 pm Post subject: |
|
|
But he's trying to change the text of the console window anyways.... so why go to the trouble of getting the current title, using FindWindow, and then SetWindowText...
_________________
|
|
| Back to top |
|
 |
hacksign23 Master Cheater
Reputation: 0
Joined: 26 Nov 2006 Posts: 404
|
Posted: Thu Jan 29, 2009 10:28 pm Post subject: |
|
|
oh.... ;-; i'm retarded. THANKS GUISE I +REP YOU GUISE BOTH!
_________________
|
|
| Back to top |
|
 |
|