You should have the handler implementation for each menu item , something like here where ID_PAYMENTSEARCH is the id associated to the Search menu item and OnPaymentSearch() and OnUpdatePaymentSearch() are the handlers to be executed:
BEGIN_MESSAGE_MAP(class1, class 2)
ON_COMMAND(ID_PAYMENTSEARCH, OnPaymentSearch)
ON_UPDATE_COMMAND_UI(ID_PAYMENTSEARCH, OnUpdatePaymentSearch)
END_MESSAGE_MAP()
//called when the menu item is clicked.
void Class1::OnPaymentSearch()
{
//LaunchScreen();
}
// called when the menu popup is shown
void Class1::OnUpdatePaymentSearch(CCmdUI* pCmdUI)
{ // some enable/disable conditions
{
pCmdUI->Enable( FALSE );
} else
{
}
}
-obislavu-