引用:
原帖由 不死帝国 于 2007-10-23 07:12 PM 发表 
第一张与最后一张 你答对了 其它的你答错了 ...
复制内容到剪贴板
代码:
!ifndef LR_LOADFROMFILE
!define LR_LOADFROMFILE 0x0010
!endif
!ifndef LR_CREATEDIBSECTION
!define LR_CREATEDIBSECTION 0x2000
!endif
!ifndef STM_SETIMAGE
!define STM_SETIMAGE 370
!endif
!ifndef IMAGE_BITMAP
!define IMAGE_BITMAP 0
!endif
!ifndef sysLoadImage
!define sysLoadImage "user32::LoadImageA(i, t, i, i, i, i) i"
!endif
!ifndef sysDeleteObject
!define sysDeleteObject "gdi32::DeleteObject(i) i"
!endif
!define MUI_UI "${NSISDIR}\Contrib\UIs\modern_instpic.exe"
ShowInstDetails nevershow
var ImageHandle
!macro DisplayImage IMG_NAME
Push $0
Push $1
Push $6
!define Index "Line${__LINE__}"
GetTempFileName $1
SetDetailsPrint textonly
DetailPrint "Loading Image"
StrCmp $6 '' "${Index}-First"
StrCpy $6 $ImageHandle
System::Call "${sysDeleteObject} (r6)"
StrCpy $6 ''
"${Index}-First:"
SetDetailsPrint none
File /oname=$1 "${IMG_NAME}"
FindWindow $0 "#32770" "" $HWNDPARENT
GetDlgItem $0 $0 2000
System::Call '${sysLoadImage} (0, s, ${IMAGE_BITMAP}, 0, 0, ${LR_CREATEDIBSECTION}|${LR_LOADFROMFILE}) .r6' "$1"
SendMessage $0 ${STM_SETIMAGE} ${IMAGE_BITMAP} $6
StrCpy $ImageHandle $6
Delete $1
SetDetailsPrint textonly
!undef Index
Pop $6
Pop $1
Pop $0
!macroend
<hr>
!include "Image.nsh"
...
Section "Main"
!insertmacro DisplayImage 'Image.bmp'
SectionEndhttp://nsis.sourceforge.net/wiki/ModernUI_Mod_to_Display_Images_while_installing_files
第三张不是采用这张图片的效果实现的吗?如果不是,那又是采用什么方法实现的?
说第二张的实现方法吧.
[
本帖最后由 51819 于 2007-10-24 05:41 PM 编辑 ]