5

昨天我正在查看我的一些工作安装程序代码报告的错误,发现右键单击不会为我们的任何安装程序打开上下文菜单。

为密码框显示上下文菜单,所以我认为这是我在浏览文档时错过的设置,但我在谷歌上没有看到任何内容。

它是一个错误吗?缺少设置或设计功能?

代码非常简单,如下所示:

(工作案例:密码箱)

 <Control Id="Label2" Type="Text" X="15" Y="123" Width="85" Height="18" Transparent="yes" Text="Password:" />
 <Control Id="Edit2" Type="Text" Password="yes" X="100" Y="120" Width="235" Height="18" Property="PASSWORD" Text="[PASSWORD]" ToolTip="The password for the activation service to register the application." />

(失败案例:编辑或文本框)

  <Control Id="Label1" Type="Text" X="15" Y="103" Width="80" Height="18" Transparent="yes" Text="Username:" />
  <Control Id="Edit1" Type="Edit" X="100" Y="100" Width="235" Height="18" Property="ACTIVATIONUSERNAME" Text="[ACTIVATIONUSERNAME]" ToolTip="The username for the activation service to register the application." />

干杯,J

PS 我检查了 WIX 3.5,似乎也出现了同样的问题。

4

1 回答 1

4

我多次看到 MSI 向导在编辑框中没有上下文菜单。我猜这是 Windows Installer 的错误(或功能)。它将所有标准控件子类化,即将它们的 WndProc 更改为新控件,在这种情况下,它可能会阻止上下文菜单出现,可能是无意的。

于 2011-11-09T06:47:21.563 回答