2013-05-21 59 views
0

如何更改默认按钮的宽度(next,cancel等) 我想增加宽度由20个像素的按钮,听起来容易,但..如何更改默认nsis按钮的宽度(next,cancel等)

比方说,我有这样的事情:

# 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 

我怎么会去这样做呢?

回答

0

最好的方法是编辑$ {NSISDIR} \ Contrib \ UIs中的一个文件,并在脚本中使用Resource Hacker然后使用ChangeUI IDD_INST myui.exe

另一种方法是调用USER32 ::在与系统插件运行SetWindowPos ...

+0

如何USER32 :: SetWindowPos有助于实现这一目标? – user1307863

+0

GetDlgItem $ 0 $ hwndparent 2和System :: Call'USER32 :: SetWindowPos(i $ 0,i0,i0,i0,i100,i30,i0x1a)'在.onGuiInit中,但使用ChangeUI会好得多,因为您可以指定大小对话单元... – Anders

相关问题