Solved

How do I enable menus items all the time

Posted on 1998-10-20
1
149 Views
Last Modified: 2013-11-20
Hello,

I have a problem with the menu system. I have a menu handler
in my view class which brings up a dialog box. I am drawing an object to the viewport which I can rotate with the mouse.  Although I have added an update handler     pCmdUI->Enable(TRUE);
the menu item does not work until I move the object with the
mouse.

Also, the print and print preview are grayed out until I move the object. I would like all of these menu items always enabled.

The view is part of a splitter pane with a formview dialog
as a control bar in the other pane.

If anyone knows of a fix I would greatly appreciate the help.

Thanks in advance,

Joe
joefinn@rcn.com
0
Comment
Question by:joefinn
1 Comment
 
LVL 8

Accepted Solution

by:
Answers2000 earned 100 total points
ID: 1323596
The problem is you have 2 views.  

Each view can have different menu enabling logic.  When the view without the menu updating stuff is the active view, it gets asked whether to enable the menus or not (and you don't have code in the 2nd view).

To fix:
EITHER
- put menu updating logic into both views
OR
- put menu updating logic into the document
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now