Adding a custom button to the components page
Hello!
How do i add a custom button to the standard components page?
I found the solution using ButtonEvent.dll
But the button works only at the bottom of the page.
If i change Y pos to 200, the button doesnt work. Please help
"MUI2.nsh"
::Call 'user32::CreateWindowEx(i0,t"Button",t"Add Host",i${BS_PUSHBUTTON}|${WS_CHILD}|${WS_VISIBLE}|${WS_TABSTOP},i80,i300,i90,i25,i$HWNDPARENT,i${IDC_ABOUT},ir0,i0)i.R0'
>!define IDC_ABOUT 1300
>!define MUI_COMPONENTSPAGE_SMALLDESC
Name "Example1"
>OutFile "example1.exe"
>!define MUI_PAGE_CUSTOMFUNCTION_SHOW "CompShowProc"
>!insertmacro MUI_PAGE_COMPONENTS
>!insertmacro MUI_PAGE_INSTFILES
>!insertmacro MUI_LANGUAGE "English"
>Function CompShowProc
System
CreateFont $0 '$(^Font)' '$(^FontSize)'
SendMessage $R0 ${WM_SETFONT} $0 0
GetFunctionAddress$0 FuncAbout
ButtonEvent::AddEventHandler /NoUnload ${IDC_ABOUT} $0
FunctionEnd
>Function FuncAbout
;0x40=MB_OK(0x0)|MB_ICONINFORMATION(0x40)
System::Call 'user32::MessageBox(i$HWNDPARENT,t"It works!",t"About",i0x40)'
>FunctionEnd
Section "Component1"
>SectionEnd
Section "Component2"
>SectionEnd
Section "Component3"
>SectionEnd
>