!include "MUI2.nsh"
!include "nsDialogs.nsh"
OutFile "Test.exe"
!define MUI_WELCOMEPAGE_TITLE "Welcome to the Example Installer"
!define MUI_WELCOMEPAGE_TEXT "This is an example NSIS installer."
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_LANGUAGE "English"
Section
nsDialogs::Create 1018
Pop $0
${NSD_CreateButton} 7u 10u 100u 12u "My Button"
Pop $1
SetCtlColors $1 0x00FF00 0x00FF00
${NSD_OnClick} $1 MyButtonClick
${NSD_CreateNumber} 10U 25% 100u 12u "Message Here"
Pop $2
SetCtlColors $2 0x00FF00 0x000000 ; Set the numeric control color
nsDialogs::Show
SectionEnd
Function MyButtonClick
# Button click handler
FunctionEnd
在这段代码中,我试图更改按钮颜色。但颜色仅在边框上发生变化。
我需要修改代码来更改按钮的颜色