CButton caption problem

Discussion in 'MFC' started by shobhit_ra, Apr 12, 2009.

  1. shobhit_ra

    shobhit_ra New Member

    Joined:
    Apr 2, 2009
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    0
    Hello I have set some Text in the caprion property of Button in MFC dialog based application with the & (apmersand symbol)
    example- Sh&ow message.
    But it is not showing the Underscore below 'O' letter.

    Please suggest the solution. Where I am wrong?
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,337
    Likes Received:
    377
    Trophy Points:
    83
    & hold a special symbol for Alt key shortcut and you need to escape the character using double &&
     
  3. shobhit_ra

    shobhit_ra New Member

    Joined:
    Apr 2, 2009
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    0
    Hi Shabbir
    Thanks
    But it is not the solution.

    I have to show the text on Button with the Underscore symbol.

    && is not working instead it is showing the text like &Hello. And single & is not showing the Underscore below any letter.

    Please suggest.
     
  4. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,337
    Likes Received:
    377
    Trophy Points:
    83
    Now Single & what does it show for you because for me it show as Hello
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice