NSIS 选择组件颜色

!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
THE END
喜欢就支持一下吧
点赞10 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容