Вопрос

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?

Это было полезно?

Решение

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.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top