what is wrong ?
hi
please help me -
what is wrong , why i can't display image ?
!include "MUI.nsh"
;!include "LogicLib.nsh"
Name "Modern UI Test"
OutFile "HeaderBitmap.exe"
InstallDir "$PROGRAMFILES\Modern UI Test"
InstallDirRegKey HKCU "Software\Modern UI Test" ""
;--------------------------------
;Interface Configuration
Var HWND
ReserveFile `.\skin0.bmp`
!define STM_SETIMAGE 0x0172
!define STM_GETIMAGE 0x0173
!define IMAGE_BITMAP 0
!define IMAGE_ICON 1
!define IMAGE_CURSOR 2
!define LR_CREATEDIBSECTION 0x2000
!define LR_LOADFROMFILE 0x0010
!define CB_GETCURSEL 0x0147
!define MUI_HEADERIMAGE_BITMAP header.bmp
!define MUI_HEADERIMAGE_RIGHT
!define MUI_HEADERIMAGE
!define MUI_ABORTWARNING
;--------------------------------
;Pages
Page custom SetCustom
!define MUI_PAGE_HEADER_TEXT "Licencja"
!define MUI_PAGE_HEADER_SUBTEXT "Licencja"
!insertmacro MUI_PAGE_LICENSE "${NSISDIR}\Contrib\Modern UI\License.txt"
!define MUI_PAGE_HEADER_TEXT "Komponenty"
!define MUI_PAGE_HEADER_SUBTEXT "Komponenty"
!insertmacro MUI_PAGE_COMPONENTS
!macro LoadImage ReslutVar HWND IMG_NAME IMG_TYPE
File skin0.bmp
Push `${IMG_NAME}`
Push ${HWND}
Exch $0
Exch
Exch $1
Push $2
System::Call 'user32::LoadImage(i, t, i, i, i, i) i \
(0, "$1", ${IMG_TYPE}, 0, 0, ${LR_CREATEDIBSECTION}|${LR_LOADFROMFILE}) .r2'
SendMessage $0 ${STM_SETIMAGE} ${IMG_TYPE} $2 ;HANDLE
Push $2
Exch
Pop $2
Exch
Pop $1
Exch
Pop $0
Pop ${ReslutVar} ;HANDLE
!macroend
!macro DeleteObject HWND
System::Call 'Gdi32::DeleteObject(i) i (${HWND})'
!macroend
Function SetCustom
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "banner.ini"
Pop $HWND
GetDlgItem $1 $HWND 1201
!insertmacro LoadImage $0 $1 "$PLUGINSDIR\skin0.bmp" ${IMAGE_BITMAP}
!insertmacro MUI_HEADER_TEXT "A" "A"
; !insertmacro DeleteObject $0
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "banner.ini"
FunctionEnd
; !insertmacro MUI_PAGE_DIRECTORY
; !insertmacro MUI_PAGE_INSTFILES
;!insertmacro MUI_UNPAGE_CONFIRM
;!insertmacro MUI_UNPAGE_INSTFILES
;--------------------------------
;Languages
!insertmacro MUI_LANGUAGE "Polish"
;--------------------------------
;Installer Sections
Section "Dummy Section" SecDummy
SetOutPath "$INSTDIR"
;ADD YOUR OWN FILES HERE...
;Store installation folder
WriteRegStr HKCU "Software\Modern UI Test" "" $INSTDIR
;Create uninstaller
WriteUninstaller "$INSTDIR\Uninstall.exe"
SectionEnd
;--------------------------------
;Descriptions
;Language strings
LangString DESC_SecDummy ${LANG_ENGLISH} "A test section."
;Assign language strings to sections
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${SecDummy} $(DESC_SecDummy)
!insertmacro MUI_FUNCTION_DESCRIPTION_END
;--------------------------------
;Uninstaller Section
Section "Uninstall"
;ADD YOUR OWN FILES HERE...
Delete "$INSTDIR\Uninstall.exe"
RMDir "$INSTDIR"
DeleteRegKey /ifempty HKCU "Software\Modern UI Test"
SectionEnd