I have a function that performs a specific action depending on the std::string value it receives.
Eg:
void performTaskOnStringValue(std::string);
Now I have a set of Ribbon Buttons (CMFCRibbonButton) that need to call this function by passing their respective text as values on button click.
I have mapped the id's of these buttons to a message map macro on_command with the button id's. All the buttons share one common id - Eg -
ID_RIBBON_BUTTON_ID
The message map is as follows
ON_COMMAND(ID_RIBBON_BUTTON_ID, &MyClass::performTaskOnStringValue);
How do I pass the button text as parameter to this function on ButtonClick?