How to call CView::OnUpdate
-
I have a window or dialog box (class derives from CFormView) that needs to be updated when the mouse is clicking on any of the items in the menu bar or when the focus leaves the dialog box. There are two cases: (1) When there are other child windows open in the app, is there an OnKillFocus that I can call to do the update? (2) Also, when the window is the only open window in the application, and the user selects a menu item, KillFocus will not work since it's still the active window. How do I know the focus is now on the menu bar? Thanks!
-
I have a window or dialog box (class derives from CFormView) that needs to be updated when the mouse is clicking on any of the items in the menu bar or when the focus leaves the dialog box. There are two cases: (1) When there are other child windows open in the app, is there an OnKillFocus that I can call to do the update? (2) Also, when the window is the only open window in the application, and the user selects a menu item, KillFocus will not work since it's still the active window. How do I know the focus is now on the menu bar? Thanks!
Call CWnd::UpdateDialogControls and it will process all OnUpdate messages for your window. John
-
I have a window or dialog box (class derives from CFormView) that needs to be updated when the mouse is clicking on any of the items in the menu bar or when the focus leaves the dialog box. There are two cases: (1) When there are other child windows open in the app, is there an OnKillFocus that I can call to do the update? (2) Also, when the window is the only open window in the application, and the user selects a menu item, KillFocus will not work since it's still the active window. How do I know the focus is now on the menu bar? Thanks!
Hi.
How do I know the focus is now on the menu bar?
you can do a WM_NCHITTEST Notification it returns a ,HTMENU if its on a menu ,( the DefWindowProc function returns that ) if its an HTMENU you can do your concerned work ,i guess this might help you. Regards FarPointer.