Hi,
In a standard MFC application, the current displayed popup menu will be killed automatically when a modal dialog is displayed. But, in a Prof-Uis application, the standard popup menu (CMenu, not Prof-Ui menu) stays on and the application is locked. Neither the menu nor the modal dialog is responsive. Unless you click outside of the application, the menu is gone and then you can click the dialog. Is this prof-Uis bug?
You can easily reproduce the problem with the Prof-Uis sample "SDI" with the following code changes
Add a context menu and a Start Timer menu item. When the timer is fired, a modal message box is displayed.
void CChildView::OnContextMenu(CWnd* pWnd, CPoint point)
{
CMenu menu;
menu.CreatePopupMenu();
menu.AppendMenu(MF_STRING, 1, "Menu 1");
menu.AppendMenu(MF_STRING, 2, "Menu 2");
menu.AppendMenu(MF_STRING, 3, "Menu 3");
menu.TrackPopupMenu(TPM_LEFTALIGN, point.x, point.y, pWnd);
}
void CChildView::OnTimer(UINT nIDEvent)
{
AfxMessageBox("Hi");
CWnd ::OnTimer(nIDEvent);
}
void CChildView::OnEditStarttimer()
{
SetTimer(0, 5000, NULL);
}
Now, Run the application and click the Start Timer menu firstly then right-click the View area to display the propup menu and wait.
Please let me know if you can fix this problem or other suggestions? Thanks