|
|
#1 |
|
Junior Member
|
find out if winamp is on top
hi
my english is not very perfect, but i try to explain my problem... how can i find out if winamp is the top window? is there any SendMessage constante? i've searched through the sdk, but i doesn't find out any usefully information. i programm in vb .net 2005, please help me! Kriechi |
|
|
|
|
|
#2 |
|
Forum King
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
|
A quick forum search, returned these results:
http://forums.winamp.com/search.php?...by=&sortorder= Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS |
|
|
|
|
|
#3 |
|
Junior Member
|
ok, i searched many sites, but a didn't find a useful answer to my question.
i need a constante which gives me back the windowstate of the winamp mainframe... nice greetings |
|
|
|
|
|
#4 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,337
|
You could use GetForegroundWindow and compare that to the HWND you already have.
I've moved this thread to the Winamp Development forum, as it has nothing to do with NSIS. NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
|
|
|
|
|
#5 |
|
Junior Member
|
jeah, ok, but i get the winamp hwnd with :
WAhwnd = FindWindow("Winamp v1.x", vbNullString) but the top window, if it is the mainframe of winamp, isn't the hwnd wich i found out with FindWindow...? so, what can i do? |
|
|
|
|
|
#6 |
|
Forum King
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
|
I haven't Winamp installed on my system so I'm not able to catch its window class name.
The following example is working with winrar, all you hava to do is to replace the "WinRarWindow" which is winrar's window class name, with winamp's window class name. However, if you have winrar installed on your system, you may examine the code as is: Assume that you want to do it through NSIS code: Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS |
|
|
|
|
|
#7 |
|
Junior Member
|
yeah
thank you! i've solved it like this: FindWindow("BaseWindow_RootWnd", "Player Window") FindWindow("BaseWindow_RootWnd", "Playlist Editor") FindWindow("BaseWindow_RootWnd", "Media Library") and then check with GetForegroundWindow(), if one of the 3 windows is on top. i think this is a good solution! thx |
|
|
|
|
|
#8 |
|
-
Join Date: Sep 2003
Location: UK
Posts: 22,244
|
it's not since it won't work for classic skins and possibly some modern style skins as well
-daz |
|
|
|
|
|
#9 |
|
Junior Member
|
why not? the window names are still the same, or not?
maybe the equalizer-, video window is still in front, but this are only 2 line to write. |
|
|
|
|
|
#10 |
|
-
Join Date: Sep 2003
Location: UK
Posts: 22,244
|
those windows don't exist when running with a classic skin. you'd need to look for the following window classes.... "Winamp PE", "Winamp Eq", "Winamp Gen" with a title of "Winamp Library" (any window using the generic skinned frame like the media library, external plugins will have a 'Winamp Gen' class window), "Winamp v1.x" (assumes that the /class command line option hasn't been used).
using WinSpy++ or some similar app to that will give you all of the available window classes. it is best to use the classic skin variants and do a check for the 'BaseWindow_RootWnd' window class, where if it exists then use a GetParent(GetParent(hwnd_to_check)) call on the hwnd's from the classic skin window classes -daz |
|
|
|
|
|
#11 |
|
Junior Member
|
ok thanks, i'll try
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|