CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Nov 2007
    Posts
    129

    Unhappy Change System Menu Text Size

    Hi,

    I wrote a win32 (NO MFC) GUI in C++ using visual studio 2005.
    I am currently using the CreateMenu/ AppendMenu API for dynamic menus.
    However, my system(drop-down) menu item text is too small.
    How can I programmatically change the size of the system menu text.
    I DO NOT want to bother with owner drawn menus.

    GOOGLE was absolutely NO HELP in this matter, and I'm stuck.

    I need bigger system menu text.

  2. #2
    Join Date
    Oct 2005
    Location
    Minnesota, U.S.A.
    Posts
    680

    Re: Change System Menu Text Size

    Manually: Set the menu font to a larger font in control panel.

    Programatically: There are several ways, but this is the only one that fits your criteria:

    Get the HMENU handle that is sent to WM_INITMENUPOPUP. Do a SetMenuInfo to change the item height, but it won't change the font. You can change one item to the "default" which makes it bold. To actually change the font only on the sytem menu, you are stuck doing ownerdraw. There is no way to get around it. If you want to change it all, do the manual changes.

    It seems a little strange to be trying to just modify the system menu. What is your application that needs such a change?
    -Erik

  3. #3
    Join Date
    Feb 2000
    Location
    San Diego, CA
    Posts
    10,354

    Re: Change System Menu Text Size

    That's a good point. Why change the user's setting ? If the user is unhappy with the system wide setting, s/he would change it in the control panel. The fact that the user is living with that menu font size means s/he is comfortable. Why do you think your application should behave any differently. Just curious to know the reason ( accessibility etc. ? )

  4. #4
    Join Date
    Nov 2007
    Posts
    129

    Thumbs up Re: Change System Menu Text Size

    Thanks, egawtry. I know how to get the size of the text of a menu item. I just think it's rediculous that setting menu text size was not included in the API. This application is to be used in an environment with decreased visibility, which would require larger text. Even with low resolution, menu text appears small. This is what was requested of me. I am using the main window's drop-down menu and this is my only menu. I was hoping there was a windows message I could send to set the size of menu text.

    As for owner-drawn, I lack the time and the experience, so I will try to avoid this.

    OK, I think the manual setting would be the way to go then.

  5. #5
    Join Date
    Oct 2005
    Location
    Minnesota, U.S.A.
    Posts
    680

    Re: Change System Menu Text Size

    Notice I said "SetMenuItem", not "GetMenuItem". Anyway, I agree that just setting the computer's menu font from Windows Settings is a LOT easier, simpler, and more KISS. Maybe on that machine the whole system font should be changed to "Large Fonts".

    -Erik

  6. #6
    Join Date
    Feb 2000
    Location
    San Diego, CA
    Posts
    10,354

    Re: Change System Menu Text Size

    In general Windows does provide means for users to customize their systems according to their needs.

    Read about accessibility options here:
    http://www.microsoft.com/windowsxp/u...y/default.mspx

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured