CMenu -> GetMenuString -> Get text and shortcut key seperate

Hi, I've created an owner draw Menu and i wanted to get the text and the shortcut key seperately. Any idea??

By calling below code, it will get both text and shortcut key and put inside a string.

COwnerMenu OwnerMenu; //this is inherit from CMenu
OwnerMenuPointer->GetMenuString(i, str, MF_BYPOSITION);

I tried to seperate it by searching "Ctrl+"
But as the shortcut key might not started with Ctrl+, so i cant use this method..
Can i get the shortcut key and also the text seperately by using the pointer "OwnerMenuPointer" ??

I've search through net and I cant find any solution
Any help would be appreciated.



  • I had it worked out by searching for a

    because the text and the shortcut key will be seperated with a tab
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion