I have CDialogwith CFMCMenuButton. when I open it, everything looks fine:

The problem occurs when I click on another place to close the menu. The menu seems to be open if the user does not select its option. And if I press Escape on the keyboard, the dialog closes, which is too much; I really would like it to close only the menu.
I know that I can solve this by setting its "OS Menu" property in the resource file to True (or, equivalently, assigning it to a property m_bOSMenu= TRUE). And I would get:

As you can see in the image, the consequences are as follows:
- I am losing badges (not very important)
- (),
OnInitMenuPopup ( : OnInitMenuPopup, , ). , , .
?