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 


Getting certain handle

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Reak
I post too much
Reputation: 0

Joined: 15 May 2007
Posts: 3496

PostPosted: Wed Dec 03, 2008 2:55 pm    Post subject: Getting certain handle Reply with quote

Hey,

Woohoo my fouth thread this week I guess.
Anyway, I'm trying to make this plugin for xchat which tries to get what you're watching/listening to on VLC player.
I thought doing FindWindow("QWidget", NULL) and GetWindowText(..) would be enough, but then it sometimes it didn't work and I wondered why.
So I spyed on it with Spy++ and see yourself:

It has other controls with the same class-names.
But I need the handle of the MainWindow. (title: "VLC Media Player").

Any idea how I could deal with this? I thought of a loop but.. hmm.
Back to top
View user's profile Send private message
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Wed Dec 03, 2008 2:58 pm    Post subject: Reply with quote

FindWindow(_T("QWidget"), _T("VLC Media Player"));

?

_________________
Back to top
View user's profile Send private message
Reak
I post too much
Reputation: 0

Joined: 15 May 2007
Posts: 3496

PostPosted: Wed Dec 03, 2008 3:00 pm    Post subject: Reply with quote

lurc wrote:
FindWindow(_T("QWidget"), _T("VLC Media Player"));

?


No, since the Window-title is changed when VLC player is playing something.
That's how I'm getting the title of what is being played.

thx anyway.
Back to top
View user's profile Send private message
lurc
Grandmaster Cheater Supreme
Reputation: 2

Joined: 13 Nov 2006
Posts: 1900

PostPosted: Wed Dec 03, 2008 3:10 pm    Post subject: Reply with quote

Oh. I see.
You could try EnumWindows

_________________
Back to top
View user's profile Send private message
Noz3001
I'm a spammer
Reputation: 26

Joined: 29 May 2006
Posts: 6220
Location: /dev/null

PostPosted: Wed Dec 03, 2008 3:27 pm    Post subject: Reply with quote

How about getting a handle via process name instead?
Back to top
View user's profile Send private message MSN Messenger
Reak
I post too much
Reputation: 0

Joined: 15 May 2007
Posts: 3496

PostPosted: Thu Dec 04, 2008 8:54 am    Post subject: Reply with quote

I chosed EnumWindows x).
Works great. Thanks.
Back to top
View user's profile Send private message
Overload
Master Cheater
Reputation: 0

Joined: 08 Feb 2008
Posts: 293

PostPosted: Thu Dec 04, 2008 7:36 pm    Post subject: Reply with quote

Get a handle on Processname like Noz said.
_________________
Blog

Quote:
Rhys says:
you can be my maid
Rhys says:
ill buy you a french maid outfit
Tyler says:
Sounds good
Rhys says:
ill hold you to that
Back to top
View user's profile Send private message MSN Messenger
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