改变选择组件颜色

优质
小牛编辑
117浏览
2023-12-01

引用脚本内容:

!define TVM_SETBKCOLOR 0x111D ;Window Message Background
!define TVM_SETTEXTCOLOR 0x111E ;Window Message Text
!include "MUI.nsh"
Name "dummy"
OutFile "dummy.exe"
XPStyle on
ShowInstDetails show
!define MUI_PAGE_CUSTOMFUNCTION_SHOW "CompShowProc"
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_LANGUAGE "English"

SubSection "SectionParent"
Section "Section1"
; void
SectionEnd
Section "Section2"
; void
SectionEnd
SubSectionEnd

Section "Section3"
; void
SectionEnd
Section "Section4"
; void
SectionEnd
Function "CompShowProc"
FindWindow $0 "#32770" "" $HWNDPARENT  ;获取窗体
GetDlgItem $0 $0 1032
SendMessage $0 ${TVM_SETBKCOLOR} 0 0x00BAB0A6   ;背景
SendMessage $0 ${TVM_SETTEXTCOLOR} 0 0xFFffff       ;TEXT文本
CreateFont $1 "Comic Sans Ms" 8 0  ;字体大小
SendMessage $0 ${WM_SETFONT} $1 0
FunctionEnd