杉宫竹苑工作室

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 2234|回复: 0

NSIS 离开自定义页面保存设置

[复制链接]
发表于 2017-4-28 17:01:22 | 显示全部楼层 |阅读模式

正式会员享受无限制浏览网站功能和高速网盘下载,赶快加入本站吧!

您需要 登录 才可以下载或查看,没有账号?立即注册

x
这是群里一位朋友问他的自定义页面设置完成后返回上一步无法保存怎么办写的一个小例子,拓展了下,只要不关闭,不管上一步还是进入下一步返回都可以保留原页面设置。
  1. !include LogicLib.nsh
  2. !include nsdialogs.nsh

  3. XPStyle on
  4. Page components
  5. Page custom nsdialogspage
  6. Page directory
  7. OutFile "test.exe"
  8. Name "test"
  9. Section "test"
  10. SectionEnd
  11. Var Initialpage
  12. Var Text
  13. Var Text2
  14. Function nsdialogspage
  15. nsDialogs::Create 1018
  16.   Pop $0
  17.   ${If} $Initialpage == ''
  18.    StrCpy $Text "默认值"
  19.    StrCpy $Initialpage "1"
  20.   ${EndIf}
  21.   ${NSD_CreateText} 0 0 80u 12u $Text
  22.   Pop $Text2
  23.   ${NSD_OnChange} $Text2 OnChange
  24. nsDialogs::Show
  25. FunctionEnd

  26. Function OnChange
  27.   Pop $Text2
  28.   ${NSD_GetText} $Text2 $Text
  29. FunctionEnd
复制代码
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋|手机版|Archiver|SgzyStudio

GMT+8, 2024-5-18 00:10 , Processed in 0.103942 second(s), 18 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表