Share via

MFC Getting command id

abc abc 351 Reputation points
2020-09-24T11:40:57.933+00:00

Hi,

In MFC I subclassed CRicheditctrl, It has context menu. In that I have a menu to change font color of selected , this change font color menu has submenus red, green and blue.

Instead of adding three fucntions for red, green, blue menu items in ON_COMMAND, I want to have single function called OnChangeFontColor. Inside OnChangeFontColor how to differentiate which menu item is pressed whether red, green and blue and how to change color accordingly.

Developer technologies | C++
Developer technologies | C++

A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.

0 comments No comments

Answer accepted by question author

RLWA32 52,571 Reputation points
2020-09-24T11:44:26.907+00:00

Was this answer helpful?

0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.