|
hmm, It works.
Might consider adding this to my installer
function ImgPBCreate(hParent :HWND; bk, pb :ansistring; Left, Top, Width, Height :integer):TImgPB;
begin
Result.Left:=Left+1;
Result.Top:=Top+1;
Result.Width:=Width-2;
Result.Height:=0;
Result.MaxHeight:=Height-2;
if Length(pb)>0 then Result.img1:=ImgLoad(hParent,pb,Result.Left,Result .Top,0,Result.Height,True,False) else Result.img1:=0;
if Length(bk)>0 then Result.img2:=ImgLoad(hParent,bk,Left,Top,Width,Hei ght,True,False) else Result.img2:=0;
end;
procedure ImgPBSetPosition(var PB :TImgPB; Percent :Extended);
begin
if PB.img1<>0 then begin
NewHeight:=Round(PB.MaxHeight*Percent/100);
if PB.Height<>NewHeight then begin
PB.Height:=NewHeight;
ImgSetPosition(PB.img1,PB.Left,PB.Top,PB.Width,PB. Height);
end;
end;
end;
find
NewWidth and MaxWidth
and change them to
NewHeight and MaxHeight
they are under var
|