Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Skinz 0.1

From: tbrownell::shaw::ca at: 22-Feb-2002 21:04

So, can't find an mp3 API (xaudio had/has one coming this quarter www.xaudio.com), but what I did find was the API for winamp. So for this experiment we'll have View control Winamp. First thing is determining the winamp window, then we can pass messages to it. Question: How do we get the Winamp handle using this excerpt below as a guide... What I don't get is how do we search a window title to find a name with a particular string in it, in this case "Winamp v1.x" Heres a start.. TheLib: %user32.dll LoadLib: load/library TheLib ; Your code here. hehe ... (The complete winamp api article is here... http://www.winamp.com/nsdn/winamp2x/dev/sdk/api.jhtml)
<snip>
External applications can find the Winamp window using the following pieces of code: C/C++: HWND hwndWinamp = FindWindow("Winamp v1.x",NULL); VBasic: Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long Dim hwndWinamp as long hwndWinamp = FindWindow("Winamp v1.x",vbNullString) Delphi Pascal: var hwndWinamp : THandle; hwndWinamp := FindWindow('Winamp v1.x', nil); Note that this code uses the FindWindow() function to find a window of any title whose class name is "Winamp v1.x". All versions of Winamp 1.x and 2.x have the class "Winamp v1.x", unless changed using the /CLASS= switch (see above). Note that if you want to run multiple Winamp's and easily tell the difference between them, you can use the /CLASS= switch. </snip> TB