原文 http://restools.hanzify.org/article.asp?id=109

是否觉得在使用 ISSkin 的时候感觉窗口太过平板,尤其对于那些窗口边缘和窗口内部颜色一致的皮肤尤其是这样,继续使用 Sakura 皮肤作为讲解,下图就是安装程序的截图,是否觉得就像一张纸一样,缺乏立体感呢?

作为 Vista 以上的 Windows 版本,我们都能够看见窗口的阴影,但是在 WinXP 里面却看不见,但是我们能看见的只有 Windows 提示的阴影.所以以下就是使用了 WinXP 的提示阴影效果,达至看上去窗口有一些立体的感觉.

脚本:
下载地址:
http://restools.hanzify.org/inno/ISSkinSakura/ISSkinSakura.zip

 引用来自 ISSkinSakura.iss
; 脚本编写: restools
; 我的 BLOG: http://restools.hanzify.org

[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 skinningInno Setupinstallations.
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;

ISSkin 使用技巧,WinXP 下的窗口阴影的更多相关文章

  1. Visual Studio原生开发的20条调试技巧(下)

    我的上篇文章<Vistual Studio原生开发的10个调试技巧>引发了很多人的兴趣,所以我决定跟大家分享更多的调试技巧.接下来你又能看到一些对于原生应用程序的很有帮助的调试技巧(接着上 ...

  2. 2017年11月20日 WinForm窗体 窗口无边框可移动&&窗口阴影 控制窗口关闭/最小化

    弹框 MessageBox.Show(); 清空 clear() 字符串拼接 string 公共控件 button 按钮 checkbox 复选框 checklistbox 多个复选框 combobo ...

  3. nw.js FrameLess Window下的窗口拖拽与窗口大小控制

    nw.js FrameLess Window下的窗口拖拽与窗口大小控制 很多时候,我们觉得系统的Frame框很难看,于是想自定义. 自定义Frame的第一步是在package.config文件中将fr ...

  4. Winxp下搭建SVN服务器

    本文介绍一种在winxp下搭建SVN服务器的方法. (1) 需要下载Slik-Subversion和TortoiseSVN两个软件.我使用的版本是Slik-Subversion-1.8.3-1-win ...

  5. winserve2008下不能运行winXP下开发的应用程序→更改“兼容性”

    winserve2008下不能运行winXP下开发的应用程序 对策:更该“兼容性”

  6. CentOS下Qt窗口透明效果失效,成黑色背景的问题

    一.问题 Linux系统下Qt窗口的透明效果成了黑色,但同样的代码在windows机子上有透明效果,主要是修改系统的配置,仅在centos6.3及其以上版本实验过.其他系统可以相应配置. 二.问题运行 ...

  7. ahk之路:利用ahk在window7下实现窗口置顶

    操作系统:win7 64位 ahk版本:autohotkey_L1.1.24.03 今天安装了AutoHotkey_1.1.24.03.SciTE.PuloversMacroCreator,重新开始我 ...

  8. VC----SDK下对窗口非客户区的操作

    窗口分成两大部分:客户区和非客户区.非客户区再次细分:标题栏,如图片中顶部深蓝色:左边框,如图片中红色部分:上边框,如图片中绿色部分:右边框,如图片中右侧天蓝色部分:底边框,如图片中下面棕色部分. 之 ...

  9. 让Qt的无边框窗口支持拖拽、Aero Snap、窗口阴影等特性

    环境:Desktop Qt 5.4.1 MSVC2013 32bit 需要的库:dwmapi.lib .user32.lib 需要头文件:<dwmapi.h> .<windowsx. ...

随机推荐

  1. Eclipse Clojure 开发插件

    参考:http://doc.ccw-ide.org/documentation.html#install-as-plugin 安装Eclipse Clojure插件 这里安装的插件是Countercl ...

  2. SCSI磁盘标准的架构与文档

    来自scsi标准的官方网站http://t10.org/,具体的文档可以去浏览官方网站. (*) This chart reflects the currently approved SCSI pro ...

  3. 几道C语言的题目!

    注:编译环境 VC2010,系统WIN7 64位,其他编译环境和系统未测试   1-1. 编程,输入n,输出如下例(n=5)所示的图形: ***** ***** ***** ***** ***** # ...

  4. UVA 10129-Play on Words(欧拉通路)

    题意:给N个单词,判断是否单词首尾(前一个单词的尾字符与后一个单词的头字符相同)相连能否形成一条链. 解析:找欧拉通路(欧拉回路或是欧拉链路),但这题事先需要并查集一下,判断是否只属于一个集合,如aa ...

  5. hdu 3681 Prison Break(状态压缩+bfs)

    Problem Description Rompire . Now it’s time to escape, but Micheal# needs an optimal plan and he con ...

  6. iOS蓝牙4.0开发例子

    1建立中心角色 1 2 3 #import <CoreBluetooth/CoreBluetooth.h>  CBCentralManager *manager;  manager = [ ...

  7. mysql 5.5源码包安装

    注:由于mysql5.5的源码包安装与mysql之前的版本安装方法不同,故写一篇随笔记录.5.5的版本不再是./configure make make install 这里用到了cmake了,cmak ...

  8. 易语言转C#小试牛刀

    呵呵,用了几年的易语言,太郁闷了,玩过E的童鞋们懂得,偶然机会尝试C#,现正式投入C#门下. 我会把我学习C#的一些知识和重点,实时发不到我的BLOG中,同想学习C#的童鞋一起成长起来.

  9. VS插件集

    Unit Test Generator  很好用的测试插件 注:在VS2015中,改名为Test generator Nunit extension了. ReSharperPlatformVs11   ...

  10. pl/sql连接远程服务器

    1.oracle提供了instantclient,下载instantclient-basic-win32-10.2.0.4.zip,将包解压存放到本地,如:D:\STUDY\instantclient ...