在mfc中如何设置菜单字体和颜色 [英] in mfc how to set menu fonts and colors
本文介绍了在mfc中如何设置菜单字体和颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是mfc的新人
我通过向导和设计师创建了菜单
我想我需要添加< b> HMENU MenuHandle; 设置字体和颜色。
但我不知道在哪里添加hendle;
我看到我创建的菜单的唯一代码是:
in myfileDlg.rc(resorce item)
//菜单
//
IDR_MENU1 MENU
BEGIN
POPUP文件
BEGIN
菜单新项目,ID_MENU_NEWPROJECT
菜单打开项目,ID_MENU_OPENPROJECT
菜单保存,ID_MENU_SAVE
菜单另存为...,ID_MENU_SAVE_AS
菜单分隔符
菜单退出,ID_MENU_EXIT
END
POPUP关于
BEGIN
MENUITEM关于,ID_ABOUT_ABOUTAS
END
END
解决方案
我不确定如果允许使用向导绘制的菜单项,但你绝对可以使用用户绘制的菜单。
看看这个用户绘制菜单的链接 [ ^ ]
另外,对于有用的MFC文章,检查出来 [ ^ ]。
希望这会有所帮助!
I'm new at mfc
I created a menu via the wizard and the Designer
I think I need to add HMENU MenuHandle; to set fonts and colors.
But I do not know where to add the hendle;
The only code I see the menu I created is here:
in myfileDlg.rc (resorce item)
// Menu // IDR_MENU1 MENU BEGIN POPUP "File" BEGIN MENUITEM "New Project", ID_MENU_NEWPROJECT MENUITEM "Open Project", ID_MENU_OPENPROJECT MENUITEM "Save ", ID_MENU_SAVE MENUITEM "Save As...", ID_MENU_SAVE_AS MENUITEM SEPARATOR MENUITEM "Exit", ID_MENU_EXIT END POPUP "About" BEGIN MENUITEM "About As", ID_ABOUT_ABOUTAS END END
解决方案
hi,
I am not sure if this is allowed with the wizard drawn menu items but you can definitely do it with user drawn menus.
Take a look at this link for user drawn menus[^]
Also for helpful MFC articles check this out [^].
hope this helps!
这篇关于在mfc中如何设置菜单字体和颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文