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 


GetWindowsText() Help...

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

Joined: 16 May 2007
Posts: 1073
Location: Israel

PostPosted: Sat May 03, 2008 9:39 am    Post subject: GetWindowsText() Help... Reply with quote

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
View user's profile Send private message
Snootae
Grandmaster Cheater
Reputation: 0

Joined: 16 Dec 2006
Posts: 969
Location: --->

PostPosted: Sat May 03, 2008 9:46 am    Post subject: Reply with quote

Spy++

Edit: hmm, it sounds like Winspector is the new version, could try that

_________________
Back to top
View user's profile Send private message
Stylo
Grandmaster Cheater Supreme
Reputation: 3

Joined: 16 May 2007
Posts: 1073
Location: Israel

PostPosted: Sat May 03, 2008 9:55 am    Post subject: Reply with quote

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
View user's profile Send private message
oib111
I post too much
Reputation: 0

Joined: 02 Apr 2007
Posts: 2947
Location: you wanna know why?

PostPosted: Sat May 03, 2008 12:12 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger
Stylo
Grandmaster Cheater Supreme
Reputation: 3

Joined: 16 May 2007
Posts: 1073
Location: Israel

PostPosted: Sat May 03, 2008 1:33 pm    Post subject: Reply with quote

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
View user's profile Send private message
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Sat May 03, 2008 2:38 pm    Post subject: Reply with quote

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
View user's profile Send private message
Stylo
Grandmaster Cheater Supreme
Reputation: 3

Joined: 16 May 2007
Posts: 1073
Location: Israel

PostPosted: Sat May 03, 2008 10:01 pm    Post subject: Reply with quote

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
View user's profile Send private message
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