| View previous topic :: View next topic |
| Author |
Message |
Reak I post too much
Reputation: 0
Joined: 15 May 2007 Posts: 3496
|
Posted: Wed Dec 03, 2008 2:55 pm Post subject: Getting certain handle |
|
|
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 |
|
 |
lurc Grandmaster Cheater Supreme
Reputation: 2
Joined: 13 Nov 2006 Posts: 1900
|
Posted: Wed Dec 03, 2008 2:58 pm Post subject: |
|
|
FindWindow(_T("QWidget"), _T("VLC Media Player"));
?
_________________
|
|
| Back to top |
|
 |
Reak I post too much
Reputation: 0
Joined: 15 May 2007 Posts: 3496
|
Posted: Wed Dec 03, 2008 3:00 pm Post subject: |
|
|
| 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 |
|
 |
lurc Grandmaster Cheater Supreme
Reputation: 2
Joined: 13 Nov 2006 Posts: 1900
|
Posted: Wed Dec 03, 2008 3:10 pm Post subject: |
|
|
Oh. I see.
You could try EnumWindows
_________________
|
|
| Back to top |
|
 |
Noz3001 I'm a spammer
Reputation: 26
Joined: 29 May 2006 Posts: 6220 Location: /dev/null
|
Posted: Wed Dec 03, 2008 3:27 pm Post subject: |
|
|
| How about getting a handle via process name instead?
|
|
| Back to top |
|
 |
Reak I post too much
Reputation: 0
Joined: 15 May 2007 Posts: 3496
|
Posted: Thu Dec 04, 2008 8:54 am Post subject: |
|
|
I chosed EnumWindows x).
Works great. Thanks.
|
|
| Back to top |
|
 |
Overload Master Cheater
Reputation: 0
Joined: 08 Feb 2008 Posts: 293
|
Posted: Thu Dec 04, 2008 7:36 pm Post subject: |
|
|
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 |
|
 |
|