![]() |
#1 |
Member
Join Date: Oct 2014
Location: $DESKTOP
Posts: 90
|
![]()
Hi all!
I need resize the next button, width = x2. and set position to 10u from the old position. I do not know user32::GetWindowRect, user32::SetWindowPos Someone help me. Thanks. |
![]() |
![]() |
![]() |
#2 |
Senior Member
Join Date: Nov 2013
Location: Iran
Posts: 339
|
try this:
HTML Code:
!include "MUI2.nsh" Page Custom Button_Test !insertmacro MUI_PAGE_COMPONENTS !insertmacro MUI_PAGE_DIRECTORY !insertmacro MUI_LANGUAGE English Function Button_Test nsDialogs::Create 1044 Pop $R0 ${If} $R0 == error Abort ${EndIf} GetDlgItem $0 $HWNDPARENT 1 ;NEXT button System::Call 'USER32::MoveWindow(p$0,i120,i60,i240,i130,i1)' #(Control HWN ; Horizontal Posation ; Vertical Posation ; Controller Vertical Size ; Controller Horizontal Size) GetDlgItem $0 $HWNDPARENT 1 ;NEXT button ${NSD_AddExStyle} $0 "${WS_EX_TRANSPARENT}|${WS_EX_TOPMOST}" ;Add Button To TOP |FIX hide Button| nsDialogs::Show FunctionEnd Section SectionEnd |
![]() |
![]() |
![]() |
#3 |
Senior Member
Join Date: Nov 2013
Location: Iran
Posts: 339
|
Also see this Examples:
Example 2: HTML Code:
!include "MUI2.nsh" !define MUI_CUSTOMFUNCTION_GUIINIT onGUIInit Page Custom Button_Test !insertmacro MUI_PAGE_COMPONENTS !insertmacro MUI_PAGE_DIRECTORY !insertmacro MUI_LANGUAGE English Var BTN_NEXT Function onGUIInit GetDlgItem $0 $HWNDPARENT 1 ;NEXT button ShowWindow $0 ${SW_HIDE} FunctionEnd Function Button_Test nsDialogs::Create 1044 Pop $R0 ${If} $R0 == error Abort ${EndIf} ${NSD_CreateButton} 80 50 240 90 "NEXT Page Show" Pop $BTN_NEXT ${NSD_OnClick} $BTN_NEXT BTN_NEXT_Click nsDialogs::Show FunctionEnd Function BTN_NEXT_Click Pop $0 SendMessage $HWNDPARENT ${WM_COMMAND} 1 "" ;Next FunctionEnd Section SectionEnd Example 3: HTML Code:
!include "MUI2.nsh" Page Custom Button_Test !insertmacro MUI_PAGE_COMPONENTS !insertmacro MUI_PAGE_DIRECTORY !insertmacro MUI_LANGUAGE English Var BTN_NEXT Function Button_Test nsDialogs::Create 1044 Pop $R0 ${If} $R0 == error Abort ${EndIf} ${NSD_CreateButton} 80 50 240 90 "NEXT Page Show" Pop $BTN_NEXT ${NSD_OnClick} $BTN_NEXT BTN_NEXT_Click nsDialogs::Show FunctionEnd Function BTN_NEXT_Click Pop $0 SendMessage $HWNDPARENT ${WM_COMMAND} 1 "" ;Next FunctionEnd Section SectionEnd |
![]() |
![]() |
![]() |
#4 |
Member
Join Date: Oct 2014
Location: $DESKTOP
Posts: 90
|
Thank r2du-soft!
Code working fine. ![]() |
![]() |
![]() |
![]() |
#5 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,185
|
The code posted by r2du-soft uses pixels, not dialog units which is what you asked for.
Do you want to size the button on all pages or just a single page? IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
#6 |
Member
Join Date: Oct 2014
Location: $DESKTOP
Posts: 90
|
Thank Anders!
I need for a single page. |
![]() |
![]() |
![]() |
#7 |
Member
Join Date: Oct 2014
Location: $DESKTOP
Posts: 90
|
@r2du-soft
I set font Tahoma for the Installer When I tried rename Tahoma.ttf, result: The Next Button is no longer located where I want. How to fix this?. |
![]() |
![]() |
![]() |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|