help needed
-
I have this new little app which is an SDI with a splitter window. Anyway, when user right-click a treectrl, a floating menu appears and if user clicks one of it, a modal dialog box appears. Now the problem is that the dialog box seems to freeze, ie. no button/editBox etc respond to mouse. If user clicks on any point outside the window (eg. another application), then comes back to this window, this dialog box becomes 'live' again. I think it may be something to do with hotspot?? anyone knows how to solve this problem??? please...:(
-
I have this new little app which is an SDI with a splitter window. Anyway, when user right-click a treectrl, a floating menu appears and if user clicks one of it, a modal dialog box appears. Now the problem is that the dialog box seems to freeze, ie. no button/editBox etc respond to mouse. If user clicks on any point outside the window (eg. another application), then comes back to this window, this dialog box becomes 'live' again. I think it may be something to do with hotspot?? anyone knows how to solve this problem??? please...:(
I think, you are doing the following --> Click the POP up menu, --> IT fires the event, in the event handler you are creating the Dialog Window. Before create the modal dialog, delete the pop up menu and create dialog " Action without vision is only passing time, Vision without action is merely day dreaming, But vision with action can change the world " - Words from Nelson Mandela Thanks & Regards, Gopalakrishnan
-
I think, you are doing the following --> Click the POP up menu, --> IT fires the event, in the event handler you are creating the Dialog Window. Before create the modal dialog, delete the pop up menu and create dialog " Action without vision is only passing time, Vision without action is merely day dreaming, But vision with action can change the world " - Words from Nelson Mandela Thanks & Regards, Gopalakrishnan
MailtoGops wrote: Before create the modal dialog, delete the pop up menu... With MFC, this is handled automatically. One simply needs to call
TrackPopupMenu()
.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
-
I think, you are doing the following --> Click the POP up menu, --> IT fires the event, in the event handler you are creating the Dialog Window. Before create the modal dialog, delete the pop up menu and create dialog " Action without vision is only passing time, Vision without action is merely day dreaming, But vision with action can change the world " - Words from Nelson Mandela Thanks & Regards, Gopalakrishnan
Yes the dlg window is created when clicking the pop up menu. I have no problem with cleaning up the pop menu as it is a local variable, see the code below: { .......... CMenu zooMenu; zooMenu.LoadMenu( IDR_MENU1 ); CMenu* pPopup = zooMenu.GetSubMenu( 0 ); pPopup->TrackPopupMenu( TPM_LEFTALIGN|TPM_RIGHTBUTTON, point.x, point.y, this ); } It must be because something else. any other idea?:^)