原文
是否觉得在使用 ISSkin 的时候感觉窗口太过平板,尤其对于那些窗口边缘和窗口内部颜色一致的皮肤尤其是这样,继续使用 Sakura 皮肤作为讲解,下图就是安装程序的截图,是否觉得就像一张纸一样,缺乏立体感呢?
作为 Vista 以上的 Windows 版本,我们都能够看见窗口的阴影,但是在 WinXP 里面却看不见,但是我们能看见的只有 Windows 提示的阴影.所以以下就是使用了 WinXP 的提示阴影效果,达至看上去窗口有一些立体的感觉.
脚本:
下载地址:
引用来自 ISSkinSakura.iss
; 脚本编写: restools; 我的 BLOG: [Setup]AppName=ISSkin ExampleAppVersion=1.0DefaultDirName={pf}\ISSkinSolidCompression=trueWizardImageFile=SakuraWizard.bmpWizardSmallImageFile=SakuraSmall.bmpOutputDir=.OutputBaseFilename=ISSkinSakura[Files]; Add the ISSkin DLL used for skinninginstallations.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.DLLprocedure LoadSkin(lpszPath: String; lpszIniFileName: String);external 'LoadSkin@files:isskin.dll stdcall';// Importing UnloadSkin API from ISSkin.DLLprocedure UnloadSkin();external 'UnloadSkin@files:isskin.dll stdcall';// Importing ShowWindow Windows API from User32.DLLfunction 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;