TONT 42293 为什么不能在开始菜单中使用&加速器?

不,不可能有人叫这个名字……等等?

原文链接:https://blogs.msdn.microsoft.com/oldnewthing/20031003-00/?p=42293

The first letter of the program is the accelerator and there’s nothing you can do about it. So if you have ten programs by Microsoft, they all use the accelerator “M”. (Yes I hate this too. The first thing I do after installing a Microsoft program is go into the Start menu and delete the word “Microsoft” from the front.)

(开始菜单中的)应用程序首字母就是加速器(译注:加速器是指单键或一个组合键即可激活对应功能的快捷键,如菜单项中常见的:打开(O),这个『O』就是『加速器』),并且你不能对这个设计进行修改。所以,如果你安装了十个微软出品的应用程序,它们都会用上加速器M(译注:都是M开头的)。(没错,我也不喜欢这样。我个人装完微软(自家)的产品后第一件事就是跑到开始菜单里,删掉程序项开头的『Microsoft』字样。)

For Win32 menus, the ampersand character acts as the marker for the menu accelerator. For example, you would set your menu text to “Save &As” to set Alt+A as the accelerator for the menu item.

对Win32应用程序的菜单而言,『&』字符就是菜单加速器的前导字符。例如,你设计程序时设置某个菜单项的文本是『Save &As』,那么Alt+A就是这个菜单项的加速器。

This isn’t done for the Start menu and for the Favorites menu because the ampersand appears in program names occasionally. Otherwise, “AT&T Internet” would end up displaying as “ATT Internet”. (This was a real problem in Windows 95, where the Start menu was constructed from your old Program Manager groups, and occasionally we’d run across one that had an ampersand in its name.)

这个设计没有应用到开始菜单和收藏夹目录中,因为&字符偶尔会出现在程序的名字里。不然的话,『AT&T Internet』就会变成『ATT Internet』(译注:注意第二个T的下划线)。(这在Windows 95的年代是个大问题,那时的开始菜单可能是从(Windows 3.x的)程序管理器的程序组升级而来,偶尔就会发现转换而来的项目中冒出来个带『&』字符的情况。)

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注

 剩余字数 ( Characters available )

Your comment will be available after auditing.
您的评论将在通过审核后显示。

Please DO NOT add any links in your comment, otherwise it would be identified as SPAM automatically and never be audited.
请不要在评论中插入任何链接,否则将被自动归类为垃圾评论,且永远不会被提交给博主进行复审。

*