Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » How to link OnUpdateEditPaste, ... to a CExtEdit in a CExtResizableDialog embedded in a CExtDynamicC Collapse All
Subject Author Date
Geert Mys May 16, 2007 - 1:45 AM

Dear,

In a MDI/SDI application a CExtToolControlBar calls the OnUpdateEditPaste, OnUpdateEditCopy, etc. works on the main view even if a window in a toobar has the focus.

e.g.: In ProfStudio-sample type some text in the command window and select it. Copy-button in the main toobar does not get enabled. Doing the same in de document-view-window, it does.
e.g.: setting the focus to the command-window and pushing the past button, it paste in the document view and not in the command window.

In Visual Studio these buttons are synchronized with the Command-window in the examples given.

What is the appropriate way to change this behaviour?

Thank you for your support.

Geert

Technical Support May 16, 2007 - 9:37 AM

Your question has to do with the MFC command routing only. In the main frame’s OnCmdMsg() virtual method, you shoudl invoke all OnCmdMsg() methods of all the windows which can affect the state of some commands in toolbars and menus. Besides, in all the windows like Command Windows referred in your message, you should analyze if they are focused when updating the states of commands.