原文 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. linux mysql 优化

    第一 在 /etc/my.cnf 中加入 skip-name-resolve ,重启mysql,这样就能禁用DNS解析,连接速度会快很多.不过,这样的话就不能在MySQL的授权表中使用主机名了而只能用 ...

  2. Codeforces 494B Obsessive String

    http://www.codeforces.com/problemset/problem/494/B 题意:给出两个串S,T,求有几种将S分成若干个子串,满足T都是这若干个子串的子串. 思路:f[n] ...

  3. Android实现自适应正方形GridView

    Android实现自适应正方形GridView  

  4. 理解最短路径——迪杰斯特拉(dijkstra)算法

    原址地址:http://ibupu.link/?id=29 1.       迪杰斯特拉算法简介 迪杰斯特拉(dijkstra)算法是典型的用来解决最短路径的算法,也是很多教程中的范例,由荷兰计算机科 ...

  5. ListView开发笔记

    一.ListView有背景,ListItem 透明,但是在点击.拖动时变成白色 android:cacheColorHint="#0000"

  6. Windows Azure功能更新:Oracle软件正式登陆Azure了

    今天,Windows Azure国际版发布了新的功能:全面支持Oracle软件,包括Oracle Linux, Oracle 12c数据库,Weblogic 11g和12c,Oracle JDK 6和 ...

  7. 给Visual Studio更替皮肤和背景图

    给Visual Studio更换皮肤和背景图 1.先安装更换皮肤的插件  VS菜单栏里面找到:工具>扩展和更新>联机>搜索: Theme Editor   下载并安装: 安装后先不着 ...

  8. Android学习总结——Content Provider

    原文地址:http://www.cnblogs.com/bravestarrhu/archive/2012/05/02/2479461.html Content Provider内容提供者 : and ...

  9. Cocos2d-x3.1UserDefaule类具体解释

    在Cocos2d-x存储数据使用的类是UserDefault类,以下分析下该类的使用 //.h #include "base/CCPlatformMacros.h" #includ ...

  10. 多点触控插件Hammer.js

    插件描述:Hammer.js是一个开源的,轻量级的javascript库,它可以在不需要依赖其他东西的情况下识别触摸,鼠标事件. 使用方法: <script src=<span class ...