How do I change the width of the default nsis buttons (next, cancel, etc..)

泄露秘密 提交于 2020-02-03 02:56:42

问题


How do I change the width of the default buttons (next, cancel, etc..) I want to increase the width of the button by 20 pixels, sounds easy but..

Let's say I have something like this:

# declare name of installer file
outfile "hello world.exe"

# open section
section

# create a popup box, with an OK button and some text
messageBox MB_OK "Now We are Creating Hello_world.txt at Desktop!"

/* open an output file called "Hello_world.txt", 
on the desktop in write mode. This file does not need to exist 
before script is compiled and run */

fileOpen $0 "$DESKTOP\Hello_world.txt" w

# write the string "hello world!" to the output file
fileWrite $0 "hello world!"

# close the file
fileClose $0
# Show Success message.
messageBox MB_OK "Hello_world.txt has been created successfully at Desktop!"


# end the section
sectionEnd

How would I go about doing this?


回答1:


This is the plugin you are looking for, may be.




回答2:


The best way is probably to edit one of the files in ${NSISDIR}\Contrib\UIs with Resource Hacker and then use ChangeUI IDD_INST myui.exe in your script.

The other alternative is to call user32::SetWindowPos at runtime with the system plugin...



来源:https://stackoverflow.com/questions/16673350/how-do-i-change-the-width-of-the-default-nsis-buttons-next-cancel-etc

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!