tipp:
du könntest auch noch eine property für volume einbauen.
code würde so ungefähr aussehen:
Delphi-Quellcode:
private
function GetVolume: Byte;
public
procedure SetVolume(Vol: Byte);
property Volume: Byte read GetVolume write Setvolume;
end;
function TWinAmpControl.GetVolume: Byte;
var
wnd: HWND;
begin
if IsRunning then
begin
wnd := GetHandle;
result:=SendMessage(wnd, WM_WA_IPC, -666, IPC_SETVOLUME);
end;
end;
procedure TWinAmpControl.SetVolume(vol: Byte);
var
wnd: HWND;
begin
if IsRunning then
begin
wnd := GetHandle;
SendMessage(wnd, WM_WA_IPC, vol, IPC_SETVOLUME);
end;
end;