Impossible to create menu item containing pipe

This forum is for general developer support questions.
Post Reply
Posts: 552
Joined: Sat Jun 18, 2011 11:05 am

Impossible to create menu item containing pipe

Post by chris »

Using menuclass, it appears to be impossible to create a sensible menu label which contains the vertical pipe symbol ("|").
This is because of the embedded shortcut key nonsense which is switched on by default, so any label containing a vertical bar ends up with the first part showing over where the shortcut key usually goes.

You'd think MA_EmbeddedKey, FALSE would switch this off. It doesn't; it only switches off the ability to use \0 as a separator for a single character shortcut.
Neither does specifying MA_Key, NULL manually on the item which contains the pipe character.
MA_Key, "" doesn't work either - it lets me create a label with a pipe in it, but does so by setting the shortcut key to an empty character, and displaying such on the item (I think this is a bug)
Removing the pipe character from my label is not a viable solution.

Maybe there is a use for this feature, but please please please let me disable the damn thing.
Post Reply