Ver Mensaje Individual
  #4  
Antiguo 26-10-2007
Avatar de cHackAll
[cHackAll] cHackAll is offline
Baneado?
 
Registrado: oct 2006
Posts: 2.159
Reputación: 20
cHackAll Va por buen camino
Código Delphi [-]
...

implementation
 
{$R *.dfm}
 
uses MMSystem;
 
var
 Volume: Cardinal;
 Details: TMixerControlDetails = (cbStruct: SizeOf(TMixerControlDetails);
                                  cChannels: 2;
                                  cbDetails: SizeOf(Volume);
                                  paDetails: @Volume);
 
function GetVolume: LongBool;
var Handle: Cardinal;
begin
 mixerOpen(@Handle, 0, 0, 0, MIXER_OBJECTF_MIXER);
 Result := not LongBool(mixerGetControlDetails(Handle, @Details, MIXER_GETCONTROLDETAILSF_VALUE));
 if not (Result or LongBool(Details.dwControlID)) then
  begin
   Inc(Details.dwControlID);
   Result := GetVolume;
  end;
 mixerClose(Handle);
end;
 
procedure TForm1.Button1Click(Sender: TObject);
begin
 if GetVolume then
  Caption := IntToHex(Volume, 8);
end;
 
...
 
end.

0j0: No es la forma "correcta" pero es la mas sencilla.
Responder Con Cita