How to add ampersand(&) symbol to dialog control captions?

15 06 2008


For dialog controls we can assign keyboard accelerators. If you give the button text as “&Add”, then really it will become Add” because the ampersand character is used to mark the keyboard accelerator for that control. But what to do if you want the button text to be “Add & Refresh“?


Just use && if you want ampersand as part of caption instead of Keyboard accelerator marker. For instance see the screenshot.


Targeted Audience – Beginners.


Actions

Information

One response

15 07 2008
Interesting bug in VisualStudio! « Visual C++ Tips

[...] Interesting bug in VisualStudio! 15 07 2008 Once in technical forum, a guy asked how to add ampersand( & ) symbol to control captions? Because the ampersand( & ) symbol is used to specify the keyboard accelerator for the control. Have a look at my previous post – http://weseetips.com/2008/06/15/how-to-add-ampersand-symbol-to-dialog-control-captions/ [...]

Leave a comment