IDC_SPRITEVIEWER MENU
BEGIN
POPUP "&File"
BEGIN
MENUITEM "&Open... CTRL+O", IDM_OPEN
MENUITEM "&Close CTRL+C", IDM_CLOSE, GRAYED
MENUITEM "E&xit CTRL+X", IDM_EXIT
END
POPUP "&Help"
BEGIN
MENUITEM "&About...", IDM_ABOUT
END
END
Win32 menu text alignment
I am adding menu text to my drop down menus so that users will know which quick keys to use. If you need an example of what I am trying to accomplish it is basically the Ctrl+O, Ctrl+N, Ctrl+S that you would find under the "File" menu of Internet Explorer or pretty much any "File" menu of any program.
I am having a problem with alignment of the text. I am currently creating the menu structure via a resource file. However, the CTRL+ text is several pixels off on each line and it makes my menus look shabby. How can I go about aligning my menu text to match horizonally?
Here is my menu setup.
Maybe you could try adding a \a inside the text's? According to MSDN, the \a aligns the rest of the text to the right.
EDIT: like this:
EDIT: like this:
IDC_SPRITEVIEWER MENUBEGIN POPUP "&File" BEGIN MENUITEM "&Open...\aCTRL+O", IDM_OPEN MENUITEM "&Close\aCTRL+C", IDM_CLOSE, GRAYED MENUITEM "E&xit\aCTRL+X", IDM_EXIT END POPUP "&Help" BEGIN MENUITEM "&About...", IDM_ABOUT ENDEND
Quote:Original post by Kippesoep
\a aligns everything to the right. Use \t instead.
From MSDN:
Quote:
The \a character aligns all text that follows it flush right to the menu bar or pop-up menu.
So, no, it doesn't align everything (unless you of course start the string with \a...)
I meant the accelerator text itself is actually right-aligned, which it shouldn't be. The accelerators should be left aligned, but to the right.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement