Код:
![Выделить весь код](images/misc/selectcode.png)
!include WinMessages.nsh
RequestExecutionLevel user
InstallDir $TEMP
Page components "" cshow
Page directory "" dshow
Page instfiles "" ishow
!define /ifndef RDW_INVALIDATE 0x0001
!define /ifndef RDW_ERASE 0x0004
; define background color
!define BACKGROUNDCOLOR 0xFFFFFF
Section `Dummy Section`
DetailPrint ...
SectionEnd
Function cshow
; repaint window
SetCtlColors $HWNDPARENT '' ${BACKGROUNDCOLOR}
; repaint page
FindWindow $1 "#32770" "" $HWNDPARENT
SetCtlColors $1 '' ${BACKGROUNDCOLOR}
; repaint page controls
GetDlgItem $0 $1 1031
SetCtlColors $0 '' ${BACKGROUNDCOLOR}
GetDlgItem $0 $1 1006
SetCtlColors $0 '' ${BACKGROUNDCOLOR}
GetDlgItem $0 $1 1017
SetCtlColors $0 '' ${BACKGROUNDCOLOR}
GetDlgItem $0 $1 1021
SetCtlColors $0 '' ${BACKGROUNDCOLOR}
GetDlgItem $0 $1 1022
SetCtlColors $0 '' ${BACKGROUNDCOLOR}
GetDlgItem $0 $1 1023
SetCtlColors $0 '' ${BACKGROUNDCOLOR}
GetDlgItem $0 $1 1032
SetCtlColors $0 '' ${BACKGROUNDCOLOR}
System::Call "user32::RedrawWindow(i,i,i,i)i ($HWNDPARENT, 0, 0,${RDW_INVALIDATE}|${RDW_ERASE})"
FunctionEnd
Function dshow
; redefine page background
!define /redef BACKGROUNDCOLOR 0x88ff88
; repaint window
SetCtlColors $HWNDPARENT '' ${BACKGROUNDCOLOR}
; repaint page
FindWindow $1 "#32770" "" $HWNDPARENT
SetCtlColors $1 '' ${BACKGROUNDCOLOR}
; repaint page controls
GetDlgItem $0 $1 1031
SetCtlColors $0 '' ${BACKGROUNDCOLOR}
GetDlgItem $0 $1 1006
SetCtlColors $0 '' ${BACKGROUNDCOLOR}
GetDlgItem $0 $1 1019
SetCtlColors $0 '' ${BACKGROUNDCOLOR}
GetDlgItem $0 $1 1020
SetCtlColors $0 '' ${BACKGROUNDCOLOR}
GetDlgItem $0 $1 1023
SetCtlColors $0 '' ${BACKGROUNDCOLOR}
GetDlgItem $0 $1 1024
SetCtlColors $0 '' ${BACKGROUNDCOLOR}
System::Call "user32::RedrawWindow(i,i,i,i)i ($HWNDPARENT, 0, 0,${RDW_INVALIDATE}|${RDW_ERASE})"
FunctionEnd
Function ishow
; redefine page background
!define /redef BACKGROUNDCOLOR 0xabcdef
; repaint window
SetCtlColors $HWNDPARENT '' ${BACKGROUNDCOLOR}
; repaint page
FindWindow $1 "#32770" "" $HWNDPARENT
SetCtlColors $1 '' ${BACKGROUNDCOLOR}
; repaint page controls
GetDlgItem $0 $1 1031
SetCtlColors $0 '' ${BACKGROUNDCOLOR}
GetDlgItem $0 $1 1006
SetCtlColors $0 '' ${BACKGROUNDCOLOR}
System::Call "user32::RedrawWindow(i,i,i,i)i ($HWNDPARENT, 0, 0,${RDW_INVALIDATE}|${RDW_ERASE})"
FunctionEnd
Function .onGUIInit
; set BrandingText${BACKGROUNDCOLOR} background
GetDlgItem $0 $HWNDPARENT 1028
SetCtlColors $0 '' transparent
FunctionEnd