How to change the font-size of a popup-menue (MFC, VC6)
-
Hi, I wonder if there is a quick and easy way to change the height of a PopupMenu (i.e. so that each line in the menu has an increased vertical size), and also change the font size to use a bigger font. Do you have any code samples that can do that? Unfortunately, CMenu does not have an appropriate member to set the font size, or am I missing something? Thanks alot.
-
Hi, I wonder if there is a quick and easy way to change the height of a PopupMenu (i.e. so that each line in the menu has an increased vertical size), and also change the font size to use a bigger font. Do you have any code samples that can do that? Unfortunately, CMenu does not have an appropriate member to set the font size, or am I missing something? Thanks alot.
There are many CP articles on owner drawn menus. http://www.codeproject.com/KB/menus/[^] Have a look into this article too.
-
There are many CP articles on owner drawn menus. http://www.codeproject.com/KB/menus/[^] Have a look into this article too.
Thanks alot, I have found these, but they are mostly overdoing for my purpose. All I wanna do is change the font size, nothing more, so I had to remove 95% of the code. I was just wondering if there is some really simple way to achieve only the font size changing. Besides, my Menu has no mainwindow, it's just a popupmenu (CMenu::CreatePopupMenu). Most samples seem to require a mainwindow, however. Is there really no simple example without all the fancy rest of XP-style menus?
-
Thanks alot, I have found these, but they are mostly overdoing for my purpose. All I wanna do is change the font size, nothing more, so I had to remove 95% of the code. I was just wondering if there is some really simple way to achieve only the font size changing. Besides, my Menu has no mainwindow, it's just a popupmenu (CMenu::CreatePopupMenu). Most samples seem to require a mainwindow, however. Is there really no simple example without all the fancy rest of XP-style menus?
I went through this msdn tutorial on Using Menus and i think owner drawn menus may be the only solution to customize menu in an application, though not sure. :|
-
I went through this msdn tutorial on Using Menus and i think owner drawn menus may be the only solution to customize menu in an application, though not sure. :|
Thanks, I have done that now. There still stays one big problem which I simply do not understand: My menu is created using CreatePopupMenu, and it does not belong to a Main window. However, MFC always calls the MeasureItem overridable for my Mainwindow, which has a CMenu member, which is null, because the menu is not part of my mainwindow. How can I achieve that the MeasureItem method of my subclassed menu is called directly, instead of the mainwindows Measureitem function?