문제

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