【问题标题】:Move window to corner of screen using NSIS使用 NSIS 将窗口移动到屏幕角落
【发布时间】:2013-01-09 19:48:51
【问题描述】:

我正在尝试使用以下代码重新定位 nsDialogs 窗口: http://nsis.sourceforge.net/Moving_install_window_to_a_corner_of_the_screen

我没有包含 System.nsh 文件,就像我包含一样我收到错误:

!define: "IMAGE_BITMAP" already defined!
!include: error in script: "C:\Program Files (x86)\NSIS\Examples\System\System.nsh" on line 267

如果我不包含 System.nsh 文件,则会收到以下错误:

unknown variable/constant "{stRECT}" detected,

什么是 stRect 变量?如何至少避免其中一个错误并使用 NSIS 重新定位我的窗口?我正在使用最新版本的 NSIS。

【问题讨论】:

  • 它不是一个变量,它只是 !define stRECT "(i, i, i, i) i" 而这只是一个帮助定义来简化 system::call 语法。跨度>
  • 刚刚在 System.nsh 中查看过!谢谢!

标签: windows winapi positioning nsis


【解决方案1】:
!include nsDialogs.nsh
!undef IMAGE_BITMAP
!include "${NSISDIR}\Examples\System\System.nsh"

...如果 nsDialogs.nsh 是冲突的标题,您可能还必须 !undef 其他图像类型。

【讨论】:

  • 找到了修复方法... 创建 System.nsh 的本地副本并删除所有我不需要的定义。比这么多 undef 好。
  • 这显然是一个错误,我会在下一个版本中修复它,所以修改你的本地副本就可以了(该脚本不再与 2.46 兼容,如果你需要的话,!undef 更好)。另一种解决方案是用实际值搜索和替换 ${stRect} ,然后根本不包含 System.nsh ...
猜你喜欢
  • 2019-08-13
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2016-10-21
  • 1970-01-01
相关资源
最近更新 更多