Gold mine of Visual C++ tricks!
How to add ampersand(&) symbol to dialog control captions?
![]()
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.
| Print article | This entry was posted by Jijo Raj on June 15, 2008 at 11:10 am, and is filed under Codeproject, Uncategorized, Visual Studio. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |