Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. How to change the font-size of a popup-menue (MFC, VC6)

How to change the font-size of a popup-menue (MFC, VC6)

Scheduled Pinned Locked Moved C / C++ / MFC
c++tutorialquestion
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    Erik
    wrote on last edited by
    #1

    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.

    C 1 Reply Last reply
    0
    • E Erik

      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.

      C Offline
      C Offline
      Cool_Dev
      wrote on last edited by
      #2

      There are many CP articles on owner drawn menus. http://www.codeproject.com/KB/menus/[^] Have a look into this article too.

      E 1 Reply Last reply
      0
      • C Cool_Dev

        There are many CP articles on owner drawn menus. http://www.codeproject.com/KB/menus/[^] Have a look into this article too.

        E Offline
        E Offline
        Erik
        wrote on last edited by
        #3

        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?

        C 1 Reply Last reply
        0
        • E Erik

          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?

          C Offline
          C Offline
          Cool_Dev
          wrote on last edited by
          #4

          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. :|

          E 1 Reply Last reply
          0
          • C Cool_Dev

            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. :|

            E Offline
            E Offline
            Erik
            wrote on last edited by
            #5

            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?

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups