mfc >> How do I enabled menu items when handling view not in focus

by Neil Strong » Mon, 01 Dec 2003 06:29:57 GMT

I have an SDI application which has 2 views separated by a splitter.

My problem is that the menu items are only enabled when the view which
handles them has focus.

This means that the user must click on the left or right pane to enable the
relevant menus.

Can anyone suggest a way to ensure that the menus for both views remain
active, regardless of the currently 'Active' view

Many thanks
Neil




mfc >> How do I enabled menu items when handling view not in focus

by Jase » Mon, 01 Dec 2003 08:36:07 GMT


Associate the menus with the frame window, that way they'll be active all
the time.

Jase



the





Similar Threads

1. trouble getting menu items to enable in status bar context menu

2. Ticks not initially appearing on view menu items

My VC++6 MFC MDI application has a problem with the check marks in menus (eg
the Sort By menu)

In my list view classe's OnInitialUpdate(), I call a SetSort() function
which sorts the list view according to a member variable and sets the check
mark against the appropriate menu item. When the user selects a different
menu item, I change the sort order member variable and call SetSort() again.

When the view first comes up, none of the menu items are ticked but when the
user selects a sort order, the tick appears. Debugging it, the call to
CMenu::CheckMenuItem() is returning 0xffffffff, indicating the menu item
doesn't exist at that point. I assume I'm doing the sort before the view's
menu has been loaded. So when is the menu loaded and what function should I
do the sort in?

--- Al.


3. Disabling / enabling entire menu and toolbar if child window open and has focus

4. Disabling / enabling entire menu and toolbar if child window open and has focus

5. Disabling / enabling entire menu and toolbar if child window open and has focus

6. "Enter Key" enabling on Property Page after editing a List View item

Hi,
I have a List View on a Property Page (with a CANCEL button only).
I am able to EDIT the List View items by using the BeginLabelEdit event
& The EndLabelEdit event. But, after editing the item on the List View,
I want the user to press ENTER key (normal behavior) so that he does
not have to click elsewhere with the mouse to complete the editing.

But, the problem with the Property Page is that after hitting the ENTER
key, it dismisses the dialog. So, the ENTER message have been nullified
in the PreTranslateMessage(...) function.

So, how do I achieve
1. The enabling of the "ENTER" key after editing the item on List View
so that the user does not have to use the mouse to complete the editing
of the List View item
2. The Propery Page dialog not getting closed after hitting the ENTER
key ??

TIA
Angshuman Agarwal

7. Enable/disable EDIT Menu's PASTE item according to clipboarb's format

8. CListView listing items in other views but not report view