Change the background color in textboxes

From NSIS Wiki

Author: Joel (talk, contrib)


The Script

;Classic UI
 
!include "WinMessages.nsh"
 
Name "dummy"
OutFile "dummy.exe"
XPStyle on
ShowInstDetails show
InstallDir $EXEDIR
 
Page directory "" "DirShowProc" ""
Page instfiles
 
Function "DirShowProc"
FindWindow $0 "#32770" "" $HWNDPARENT
GetDlgItem $0 $0 1019
CreateFont $1 "Arial" 8 0
SendMessage $0 ${WM_SETFONT} $1 0
SetCtlColors $0 0x00BAB0A6 0x000000
FunctionEnd
 
Section
; void
SectionEnd
;Modern UI
 
!include "MUI.nsh"
 
Name "dummy"
OutFile "dummy.exe"
XPStyle on
ShowInstDetails show
InstallDir $EXEDIR
 
!define MUI_PAGE_CUSTOMFUNCTION_SHOW "DirShowProc"
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
 
!insertmacro MUI_LANGUAGE "English"
 
Function "DirShowProc"
FindWindow $0 "#32770" "" $HWNDPARENT
GetDlgItem $0 $0 1019
CreateFont $1 "Arial" 8 0
SendMessage $0 ${WM_SETFONT} $1 0
SetCtlColors $0 0x00BAB0A6 0x000000
FunctionEnd
 
Section
; void
SectionEnd
Personal tools
donate
ads