Re: How to change the font of the main menu in application window?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Jeffrey Tan[MSFT] (v-jetan_at_online.microsoft.com)
Date: 10/01/04


Date: Fri, 01 Oct 2004 07:06:41 GMT

Hi Mick,

Oh, yes, you are correct. This is because the default setting in Control
Panel -> Display Properties -> Appearance -> Effects -> "Hide underlined
letter for keyboard navigation" is checked, so the underscore will be
displayed only when we pressed "Alt"(only when you pressed "Alt" key, the
DrawItemEventArgs.State will not have DrawItemStates.NoAccelerator flag).

So, we should use DrawItemEventArgs.State to get if windows wanted the
underscore through NoAccelerator flag, if needed, just paint with
HotkeyPrefix.Show.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.



Relevant Pages

  • Re: Word 2007 VBA User Forms Accelerator Key
    ... Are you sure that the height of the control is sufficient for the underscore ... With the above proviso, the underscore is displayed in the ... the relevent letter is not underlined when running the form. ...
    (microsoft.public.word.vba.general)
  • RE: Problem with ODS_NOACCEL
    ... the button is used in an AX control ... In IE, when we press ALT key, WM_CHANGEUISTATE and WM_UPDATEUISTATE ... messages are sent to specified window and all its child windows, ... button is repainted with the underscore. ...
    (microsoft.public.win32.programmer.ui)
  • Re: Problem with ODS_NOACCEL
    ... > messages are sent to specified window and all its child windows, ... > button is repainted with the underscore. ... Clearly, in IE, my control is receiving DRAWITEM ... In my Win32 App, the menu is toggling the underscore but the ...
    (microsoft.public.win32.programmer.ui)
  • Re: Control ids
    ... > The id is generated as to give it a uniqueid in the control ... I missed the fact you're using them in a user control. ... I think that the leading underscore for the id inside a well ... Google will completely ignore the whole page if a control has an ...
    (microsoft.public.dotnet.framework.aspnet)