在Inno Setup的上下文菜单中添加图标图像 [英] Adding an icon image to context menu in Inno Setup

查看:324
本文介绍了在Inno Setup的上下文菜单中添加图标图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在这里使用脚本在Inno Setup页面上添加一些上下文菜单:
向Inno设置页面添加上下文菜单

I'm using the script here to add some context menu to my Inno Setup pages:
Adding context menu to Inno Setup page

是否可以将图标图像添加到每个菜单项?

is there any way to add an icon image to every menu item?

推荐答案

使用向Inno Setup页面添加上下文菜单的代码中,使用AddMenuItem而不是InsertMenu调用:

Use the AddMenuItem instead of InsertMenu calls in the code from Adding context menu to Inno Setup page:

AddMenuItem(PopupMenu, 0, ID_MUTE, 'Mute', 'mute.bmp');
AddMenuItem(PopupMenu, 1, ID_STOP, 'Stop', 'stop.bmp');

以上内容显然假设您已将透明位图图像添加到安装程序中:

The above obviously assumes, that you have the transparent bitmap images added to the installer:

[Files]
Source: "mute.bmp"; Flags: dontcopy
Source: "stop.bmp"; Flags: dontcopy

我已经使用 PixelFormer 来创建透明的.bmp图像.

I've used PixelFormer to create the transparent .bmp images.

这篇关于在Inno Setup的上下文菜单中添加图标图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆