Details see the CWnd::OnInitMenuPopup source code ..\Visual studio\VC98\mfc\srcMenu initialization is automatic in the framework, occurring when the application receives a WM_INITMENUPOPUP message. During the idle loop, the framework searches the command routing for button update handlers in much the same way as it does for menus.
..\Visual studio\VC98\mfc\srcMenu initialization is automatic in the framework, occurring when the application receives a WM_INITMENUPOPUP message. During the idle loop, the framework searches the command routing for button update handlers in much the same way as it does for menus.