最新消息:

页面上的图像 – 从文件

nsis 永恒心锁 1444浏览 0评论
OutFile "ICO_DLL-test.exe"
!include nsDialogs.nsh
Page custom CreatePage

Function CreatePage
nsDialogs::Create 1018
Pop $0

; i* : ID的图标 - 从可执行文件(.exe),或DLL

 System::Call 'shell32::ExtractIcon(i $HWNDPARENT, t "explorer.exe", i 0) i.R0'
 System::Call 'shell32::ExtractIcon(i $HWNDPARENT, t "mydocs.dll", i 0) i.R1'
 System::Call 'shell32::ExtractIcon(i $HWNDPARENT, t "shell32.dll", i 17) i.R2'
 System::Call 'shell32::ExtractIcon(i $HWNDPARENT, t "shell32.dll", i 32) i.R3'
 System::Call 'shell32::ExtractIcon(i $HWNDPARENT, t "shell32.dll", i 31) i.R4'
 System::Call 'shell32::ExtractIcon(i $HWNDPARENT, t "shell32.dll", i 34) i.R5'
 System::Call 'shell32::ExtractIcon(i $HWNDPARENT, t "shell32.dll", i 71) i.R6'
 System::Call 'shell32::ExtractIcon(i $HWNDPARENT, t "shell32.dll", i 113) i.R7'
 System::Call 'shell32::ExtractIcon(i $HWNDPARENT, t "shell32.dll", i 116) i.R8'
 System::Call 'shell32::ExtractIcon(i $HWNDPARENT, t "shell32.dll", i 130) i.R9'

 ${NSD_CreateIcon} 0u 0u 30u 30u "icon1"
 Pop $0
 SendMessage $0 ${STM_SETIMAGE} ${IMAGE_ICON} $R0
 ${NSD_CreateIcon} 40u 0u 30u 30u "icon2"
 Pop $0
 SendMessage $0 ${STM_SETIMAGE} ${IMAGE_ICON} $R1
 ${NSD_CreateIcon} 80u 0u 30u 30u "icon3"
 Pop $0
 SendMessage $0 ${STM_SETIMAGE} ${IMAGE_ICON} $R2
 ${NSD_CreateIcon} 120u 0u 30u 30u "icon4"
 Pop $0
 SendMessage $0 ${STM_SETIMAGE} ${IMAGE_ICON} $R3
 ${NSD_CreateIcon} 160u 0u 30u 30u "icon5"
 Pop $0
 SendMessage $0 ${STM_SETIMAGE} ${IMAGE_ICON} $R4
 ${NSD_CreateIcon} 0u 40u 30u 30u "icon6"
 Pop $0
 SendMessage $0 ${STM_SETIMAGE} ${IMAGE_ICON} $R5
 ${NSD_CreateIcon} 40u 40u 30u 30u "icon7"
 Pop $0
 SendMessage $0 ${STM_SETIMAGE} ${IMAGE_ICON} $R6
 ${NSD_CreateIcon} 80u 40u 30u 30u "icon8"
 Pop $0
 SendMessage $0 ${STM_SETIMAGE} ${IMAGE_ICON} $R7
 ${NSD_CreateIcon} 120u 40u 30u 30u "icon9"
 Pop $0
 SendMessage $0 ${STM_SETIMAGE} ${IMAGE_ICON} $R8
 ${NSD_CreateIcon} 160u 40u 30u 30u "icon10"
 Pop $0
 SendMessage $0 ${STM_SETIMAGE} ${IMAGE_ICON} $R9

 nsDialogs::Show

 System::Call 'user32::DestroyIcon(iR0)'
 System::Call 'user32::DestroyIcon(iR1)'
 System::Call 'user32::DestroyIcon(iR2)'
 System::Call 'user32::DestroyIcon(iR3)'
 System::Call 'user32::DestroyIcon(iR4)'
 System::Call 'user32::DestroyIcon(iR5)'
 System::Call 'user32::DestroyIcon(iR6)'
 System::Call 'user32::DestroyIcon(iR7)'
 System::Call 'user32::DestroyIcon(iR8)'
 System::Call 'user32::DestroyIcon(iR9)'
FunctionEnd

Section
SectionEnd
免责声明:根据《计算机软件保护条例》第十七条规定“为了学习和研究软件内含的设计思想和原理,通过安装、显示、传输或者存储软件等方式使用软件的,可以不经软件著作权人许可,不向其支付报酬。”您需知晓本站所有内容资源均来源于网络,仅供用户交流学习与研究使用,版权归属原版权方所有,版权争议与本站无关,用户本人下载后不能用作商业或非法用途,需在24个小时之内从您的电脑中彻底删除上述内容,否则后果均由用户承担责任;如果您访问和下载此文件,表示您同意只将此文件用于参考、学习而非其他用途,否则一切后果请您自行承担,如果您喜欢该程序,请支持正版软件,购买注册,得到更好的正版服务。丨本站为个人博客非盈利性站点,所有软件信息均来自网络,所有资源仅供学习参考研究目的,并不贩卖软件,不存在任何商业目的及用途。丨本文采用知识共享 署名4.0国际许可协议 [BY-NC-SA] 进行授权BY-NC-SA协议进行授权

转载请注明:永恒心锁-分享互联网 » 页面上的图像 – 从文件

发表我的评论
取消评论
表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址