Inno wizard size seem to change between Win7 and XP
I have a bitmap loaded on screen, but it does not fit to XP? Also I am trying to paint to specific place on picture (x,y) but the position changes between XP and Win7. I am using ScaleX() and Scaley()
what options do I have? how to force scaling bitmap properly or how to detect window size?
function install_CreatePage(PreviousPageId: Integer): Integer;
var
Page: TWizardPage;
begin
Page := CreateCustomPage(
PreviousPageId,
ExpandConstant('{cm:e_installCaption}'),
ExpandConstant('{cm:e_installDescription}')
);
// BitmapImage1
BitmapImage1 := TBitmapImage.Create(Page);
try
begin
with BitmapImage1 do
begin
Parent := Page.Surface;
Left := ScaleX(1);
Top := ScaleY(1);
Width := ScaleX(497);
Height := ScaleY(244);
ExtractTemporaryFile('g_screen.bmp') ;
Bitmap.LoadFromFile(ExpandConstant('{tmp}')+'\g_screen.bmp') ;
end
end
except
BitmapImage1.height := 0;
end;
{ Label3 }
BingLabel1 := TLabel.Create(Page);
with BingLabel1 do
begin
Parent := Page.Surface;
Left := ScaleX(37);
Top := ScaleY(159);
Width := 174;// ScaleX(174);
Height := ScaleY(16);
Caption := 'this text does not go right in all machines !';
Font.Name := 'Tahoma';
end;