正式会员享受无限制浏览网站功能和高速网盘下载,赶快加入本站吧!
您需要 登录 才可以下载或查看,没有账号?立即注册
x
是否觉得在使用 ISSkin 的时候感觉窗口太过平板,尤其对于那些窗口边缘和窗口内部颜色一致的皮肤尤其是这样,继续使用 Sakura 皮肤作为讲解,下图就是安装程序的截图,是否觉得就像一张纸一样,缺乏立体感呢?
作为 Vista 以上的 Windows 版本,我们都能够看见窗口的阴影,但是在 WinXP 里面却看不见,但是我们能看见的只有 Windows 提示的阴影.所以以下就是使用了 WinXP 的提示阴影效果,达至看上去窗口有一些立体的感觉.
- ; 脚本编写: restools
- [Setup]
- AppName=ISSkin Example
- AppVersion=1.0
- DefaultDirName={pf}ISSkin
- SolidCompression=true
- WizardImageFile=SakuraWizard.bmp
- WizardSmallImageFile=SakuraSmall.bmp
- OutputDir=.
- OutputBaseFilename=ISSkinSakura
- [Files]
- ; Add the ISSkin DLL used for skinning Inno Setup installations.
- Source: ISSkin.dll; DestDir: {app}; Flags: dontcopy
- ; Add the Visual Style resource contains resources used for skinning,
- ; you can also use Microsoft Visual Styles (*.msstyles) resources.
- Source: Sakura.cjstyles; DestDir: {tmp}; Flags: dontcopy
- [Code]
- // Importing LoadSkin API from ISSkin.DLL
- procedure LoadSkin(lpszPath: String; lpszIniFileName: String);
- external 'LoadSkin@files:isskin.dll stdcall';
- // Importing UnloadSkin API from ISSkin.DLL
- procedure UnloadSkin();
- external 'UnloadSkin@files:isskin.dll stdcall';
- // Importing ShowWindow Windows API from User32.DLL
- function ShowWindow(hWnd: Integer; uType: Integer): Integer;
- external 'ShowWindow@user32.dll stdcall';
- function GetClassLong(Wnd: HWnd; Index: Integer): Longint;
- external 'GetClassLongA@user32.dll stdcall';
- function SetClassLong(Wnd: HWnd; Index: Integer; NewLong: Longint): Longint;
- external 'SetClassLongA@user32.dll stdcall';
- function InitializeSetup(): Boolean;
- begin
- ExtractTemporaryFile('Sakura.cjstyles');
- LoadSkin(ExpandConstant('{tmp}Sakura.cjstyles'), '');
- Result := True;
- end;
- procedure DeinitializeSetup();
- begin
- // Hide Window before unloading skin so user does not get
- // a glimse of an unskinned window before it is closed.
- ShowWindow(StrToInt(ExpandConstant('{wizardhwnd}')), 0);
- UnloadSkin();
- end;
- function CheckWin32Version(AMajor: Integer; AMinor: Integer): Boolean;
- var
- WinVer: TWindowsVersion;
- begin
- GetWindowsVersionEx(WinVer);
- Result := (WinVer.Major > AMajor) or
- ((WinVer.Major = AMajor) and
- (WinVer.Minor >= AMinor));
- end;
- procedure InitializeWizard();
- begin
- WizardForm.WizardBitmapImage.Height := WizardForm.WelcomePage.Height;
- if CheckWin32Version(5, 1) and (not CheckWin32Version(6, 0)) then
- SetClassLong(WizardForm.Handle, -26, GetClassLong(WizardForm.Handle, -26) + $20000);
- end;
复制代码
|