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

    Unhappy Question With Windows Menu API

    Hey Guys,

    I have a Win32 C++ application that uses the CreateMenu/AppendMenu/SetMenu API to dynamically make my drop down menus during runtime - yeah, I coded this the hard way.
    I was asked to place some spacing in between some of my drop-down menus and I have no idea how to do this.
    In other words, I have two consectutive drop down menu items on the top-left of my window, and I want to create another one all the way on the top-right.
    Without going to "Owner-drawn" menus, is there a way to do this.
    I tried using the seperator bar several times, but that didn't help.
    Last edited by sjaycohn; June 18th, 2008 at 06:53 AM.

  2. #2
    Join Date
    Nov 2003
    Location
    Belgium
    Posts
    8,150

    Re: Question With Windows Menu API

    Try to use SetMenuItemInfo and MFT_RIGHTJUSTIFY.
    You might also need to checkout BUG: MFT_RIGHTORDER Doesn't Work as Expected for Nonresource Menus
    Marc Gregoire - NuonSoft (http://www.nuonsoft.com)
    My Blog
    Wallpaper Cycler 3.5.0.97

    Author of Professional C++, 4th Edition by Wiley/Wrox (includes C++17 features)
    ISBN: 978-1-119-42130-6
    [ http://www.facebook.com/professionalcpp ]

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

    Re: Question With Windows Menu API

    I assume you are trying to do an old-fashioned help menu? Try putting a \n or \t (I don't remember which) before the &Help. That will right justify the Help item.

    -Erik

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