| View previous topic :: View next topic |
| Author |
Message |
Stylo Grandmaster Cheater Supreme
Reputation: 3
Joined: 16 May 2007 Posts: 1073 Location: Israel
|
Posted: Sat May 03, 2008 9:39 am Post subject: GetWindowsText() Help... |
|
|
need help with getWindowText function.
problem is at the bottom
_________________
Stylo
Last edited by Stylo on Sun May 04, 2008 2:01 pm; edited 1 time in total |
|
| Back to top |
|
 |
Snootae Grandmaster Cheater
Reputation: 0
Joined: 16 Dec 2006 Posts: 969 Location: --->
|
Posted: Sat May 03, 2008 9:46 am Post subject: |
|
|
Spy++
Edit: hmm, it sounds like Winspector is the new version, could try that
_________________
|
|
| Back to top |
|
 |
Stylo Grandmaster Cheater Supreme
Reputation: 3
Joined: 16 May 2007 Posts: 1073 Location: Israel
|
Posted: Sat May 03, 2008 9:55 am Post subject: |
|
|
thx :]
edit: another question please
i wanna get the text of the window title bar, i saw the function GetWindowText
but i'm having a mess with it i dont know how to use it right :s
_________________
Stylo |
|
| Back to top |
|
 |
oib111 I post too much
Reputation: 0
Joined: 02 Apr 2007 Posts: 2947 Location: you wanna know why?
|
Posted: Sat May 03, 2008 12:12 pm Post subject: |
|
|
| 1qaz wrote: | thx :]
edit: another question please
i wanna get the text of the window title bar, i saw the function GetWindowText
but i'm having a mess with it i dont know how to use it right :s |
Use GetWindowHandle() to get the handle to the window. Then use the variable you stored the return of GetWindowHandle in in the GetWindowText Parameter. And then fill out the other parameters accordingly.
_________________
| 8D wrote: |
cigs dont make people high, which weed does, which causes them to do bad stuff. like killing |
|
|
| Back to top |
|
 |
Stylo Grandmaster Cheater Supreme
Reputation: 3
Joined: 16 May 2007 Posts: 1073 Location: Israel
|
Posted: Sat May 03, 2008 1:33 pm Post subject: |
|
|
yea i kinda figured that out already but i have a problem with the other parameters
the lpString and nMaxCount how do i use them
_________________
Stylo |
|
| Back to top |
|
 |
lurc Grandmaster Cheater Supreme
Reputation: 2
Joined: 13 Nov 2006 Posts: 1900
|
Posted: Sat May 03, 2008 2:38 pm Post subject: |
|
|
Use FindWindow to get the Window Handle.
lpString is a user-defined string you have in your program where the text will be stored. nMaxCount is the maximum ammount of charecters you want to store before trunocating.
Example:
| Code: |
...
LPTSTR lpString;
GetWindowText( FindWindow( _T("Notepad"), NULL ), lpString, MAX_PATH );
MessageBox( NULL, lpString, _T("GetWindowText"), MB_OK );
|
_________________
|
|
| Back to top |
|
 |
Stylo Grandmaster Cheater Supreme
Reputation: 3
Joined: 16 May 2007 Posts: 1073 Location: Israel
|
Posted: Sat May 03, 2008 10:01 pm Post subject: |
|
|
| lurc wrote: | Use FindWindow to get the Window Handle.
lpString is a user-defined string you have in your program where the text will be stored. nMaxCount is the maximum ammount of charecters you want to store before trunocating.
Example:
| Code: |
...
LPTSTR lpString;
GetWindowText( FindWindow( _T("Notepad"), NULL ), lpString, MAX_PATH );
MessageBox( NULL, lpString, _T("GetWindowText"), MB_OK );
|
|
when i wanna post the value of lpString all i get is 00000000 :S !?!?! what's that suppose to be?
_________________
Stylo |
|
| Back to top |
|
 |
|