Visit our Sponsor   Visit our Sponsor
delphi3000.com - the free delphi knowledge platform
delphi3000.com - the free delphi knowledge platform
Have a look at your member-status

connecting people's knowledge


  - Recent ArticlesRSS feed for Recent Articles on delphi3000.com
  - List of All Articles
  - Top Viewed Articles
  - Articles (+Attachem.)
  - Articles Of Interest
  - Categories
  - Top Uploader
  - Search
  - Index

  - My Home
  - Submit an Article
  - My Articles
  - My Personal Data
  - My Bookmarks
  - Activities
  - Login/Logout

  - Sign Up
  - Why Sign Up
  - Newsletter

  - Press
  - Advertise

  - Contact
  - Feedback





Community
Borland
ClubeDelphi
Dr. Bob
UK-BUG
Delphi Meetings
Planeta Delphi







Startblatt.de






Share this article with friendsShare this article with friends
Rate this articleRate this article - to keep the quality of delphi3000.com !
Comment this article or read through previous comments (1)


Controling Winamp from a Dll or ApplicationFormat this article printer-friendly!Bookmark function is only available for registered users!
How to use the Winamp API
Product:
Delphi 4.x (or higher)
Category:
N/A
Skill Level:
Scoring:
Last Update:
02/01/2002
Search Keys:
delphi delphi3000 article borland vcl code-snippet Winamp WinampApi SendMessage
Times Scored:
3
Visits:
2925
Uploader: Johannes Fuglsang
Company: bleh
Reference: www.winamp.com
 
Question/Problem/Abstract:
Once i found a Mirc script wich was able to control Winamp (i never thought that that is possible). After a few weeks i found bugs in that script. So i thought about making my own script. But how? After a few Hours i found the way into Winamp and now if someone want to do the same here is the way in.
Answer:



uses
  Messages;

function My_Cool_Function1_Name():Boolean;
var
  hwndWinamp : THandle;
begin
  hwndWinamp := FindWindow('Winamp v1.x', nil); // 1st step
  SendMessage(hwndWinamp,WM_COMMAND,40058,0); // 2nd step
  Result := True;
end;

means...

1st we get the Handle of Winamp
2nd we send a message to Winamp with one of the specified codes (40058 = Increase Volume)
3rd we have fun with the function .)

If you want to send a WM_USER mesage to Winamp use something like this:

uses
  Messages;

function My_Cool_Function2_Name():Boolean;
var
  hwndWinamp : THandle;
begin
  hwndWinamp := FindWindow('Winamp v1.x', nil);
  SendMessage(hwndWinamp,WM_USER,0,120);        
  Result := True;
end;

120 = save the current playlist to Winampdir\winamp.m3u

If Winamp issn`t running the messages run to /dev/null .)

For the Control Codes go to http://www.winamp.com/nsdn/winamp2x/dev/sdk/api.jhtml

It`s the first time i send an Article so don`t shoot me .)





Please rate this article!
Skill level:
BeginnerExpert

Useful:
No!Very!

Overall rating:
PoorExcellent



Comments to this article
Write a new comment
How do i control Winamp 3.x ?
    Dummbatz Dummbatz (Sep 12 2002 12:12AM)

Since Winamp 3.x something has changed :(
Respond














 
Sign up to consume product discounts for Bronze memberships !

read more


  Visit our Sponsor

 

  Community Ad of
M. Kleiner
 
   














 







     
  Copyright © 2000 - 2007 delphi3000.com - All rights reserved. Terms of use. || Privacy
delphi3000.com is a service by bluestep.com IT-Services GmbH (Vienna)