最新消息:

NSIS 选择组件颜色

nsis 永恒心锁 1076浏览 0评论
!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
永恒心锁,版权所有丨如未注明,均为转载丨本网站采用BY-NC-SA协议进行授权

转载请注明:永恒心锁-分享互联网 » NSIS 选择组件颜色

您必须 登录 才能发表评论!