Reputation: 1609
I'm using GDI+ to draw a string but it does not act like windows DrawText when it comes to honoring the &
in front of the a char. It just draws & and not underlines next char. Maybe there is an option to turn it on/off? Please help.
Upvotes: 1
Views: 804
Reputation: 23036
It is difficult to provide a complete answer when we cannot see the code you are currently using to critique where the problem might lie, or even which implementation of the GDI+ API you are using.
The best I can do is provide you with references to the relevant documentation for the underlying GDI+ API's most likely to be involved.
First: DrawString, used to actually draw text.
Second: The StringFormat object passed to DrawString to control aspects of the rendering of the supplied string.
Finally: The HotKeyPrefix enumeration used in the StringFormat object which indicates how hot key prefixes (ampersands) are to be handled.
In your case you are looking for HotkeyPrefixShow behaviour. (The current behaviour you describe is that for HotkeyPrefixNone)
Upvotes: 4