Convertendo Inno Setup WizardForm.Color para RGB
Se eu tentar isso:
[Setup]
AppName=MyApp
AppVerName=MyApp
DefaultDirName={pf}\MyApp
DefaultGroupName=MyApp
OutputDir=.
[Code]
function ColorToRGBstring(Color: TColor): string;
var
R,G,B : Integer;
begin
R := Color and $ff;
G := (Color and $ff00) shr 8;
B := (Color and $ff0000) shr 16;
result := 'red:' + inttostr(r) + ' green:' + inttostr(g) + ' blue:' + inttostr(b);
end;
procedure InitializeWizard();
begin
MsgBox(ColorToRGBstring(WizardForm.Color),mbConfirmation, MB_OK);
end;
Eu recebo: vermelho: 15 verde: 0 azul: 0
Mas o resultado deve ser: 240 240 240 (cinza)
O que está errado?
Eu preciso obter o devidoTColor
e converta-o em código de cores RGB.