Question

I have an ATL CMenu class that implements a popup window with several options for the user to click.

When the user clicks a menu option, that option is mapped to a command ID with an associated handler.

Is there a way I can pass the title (string text of the first entry) of the CMenu class to the command handler?

Was it helpful?

Solution

No, the handler receives control being mapped by an identifier (WM_COMMAND's parameter) only. As soon as you have the identifier and [if] you know what menu it came from, you can locate the item of interest and read back it's text.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top