我也是刚学这个inno制作程序,请问大佬们,这两段合并在一起 InitializeWizard报错,应该是不能出现两个。
第一段
[Code]
var
myLabel: TNewStaticText;
procedure InitializeWizard();
begin
WizardForm.FilenameLabel.Visible := false;
MyLabel := TNewStaticText.Create(WizardForm.InstallingPage);
MyLabel.Parent := WizardForm.InstallingPage;
MyLabel.Top := WizardForm.FilenameLabel.Top;
MyLabel.Left := WizardForm.FilenameLabel.Left;
MyLabel.Width := WizardForm.FilenameLabel.Width;
MyLabel.Visible := True;
MyLabel.Caption := '';
end;
procedure DisplayFileName();
begin
MyLabel.Caption := ExtractFileName(CurrentFileName);
end;
第二段
[code]
const MF_BYPOSITION=$400;
function DeleteMenu(HMENU: HWND; uPosition: UINT; uFlags: UINT): BOOL;
external 'DeleteMenu@user32.dll stdcall';
function GetSystemMenu(HWND: hWnd; bRevert: BOOL): HWND;
external 'GetSystemMenu@user32.dll stdcall';
procedure InitializeWizard();
begin
DeleteMenu(GetSystemMenu(wizardform.handle,false),8,MF_BYPOSITION);
DeleteMenu(GetSystemMenu(wizardform.handle,false),7,MF_BYPOSITION);
end;
第一段
[Code]
var
myLabel: TNewStaticText;
procedure InitializeWizard();
begin
WizardForm.FilenameLabel.Visible := false;
MyLabel := TNewStaticText.Create(WizardForm.InstallingPage);
MyLabel.Parent := WizardForm.InstallingPage;
MyLabel.Top := WizardForm.FilenameLabel.Top;
MyLabel.Left := WizardForm.FilenameLabel.Left;
MyLabel.Width := WizardForm.FilenameLabel.Width;
MyLabel.Visible := True;
MyLabel.Caption := '';
end;
procedure DisplayFileName();
begin
MyLabel.Caption := ExtractFileName(CurrentFileName);
end;
第二段
[code]
const MF_BYPOSITION=$400;
function DeleteMenu(HMENU: HWND; uPosition: UINT; uFlags: UINT): BOOL;
external 'DeleteMenu@user32.dll stdcall';
function GetSystemMenu(HWND: hWnd; bRevert: BOOL): HWND;
external 'GetSystemMenu@user32.dll stdcall';
procedure InitializeWizard();
begin
DeleteMenu(GetSystemMenu(wizardform.handle,false),8,MF_BYPOSITION);
DeleteMenu(GetSystemMenu(wizardform.handle,false),7,MF_BYPOSITION);
end;