最新消息:

页面上的图像 – 从文件

nsis 永恒心锁 943浏览 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
永恒心锁,版权所有丨如未注明,均为转载丨本网站采用BY-NC-SA协议进行授权

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

您必须 登录 才能发表评论!