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 » Accelerators onto a CExtResizableDialog Collapse All
Subject Author Date
Roberto Manes May 16, 2005 - 5:24 AM

I’m working in a MDI environment. I also have a CExtResizableDialog with its own menubar and toolbar. I declared a new accelerator in the accelerators map (for instance CTRL+C) together the function to catch the related message. If I declare the accelerator ID onto the mainframe or onto my document of course I can process the message, but if I declare the function onto my dialog it is never called. I hope this is enought for you to urderstand my problem. (.NET 7.10, ProfUIS library 2.30). Thank in advance.


Roberto Manes

Technical Support May 16, 2005 - 6:53 AM

We need more details about your application: Whether the resizable dialog is a pop-up dialog over the MDI frame window or it is a child of some resizable bar? Or may be you are using the child resizable dialog as a view window inside the MDI child frame? Do you use the document/view architecture? Could you let us take a look at the source code which implements a separate accelerator table in your dialog?

Please note that you can have only one menu bar in the scope of one command profile in the command manager. This means your resizable dialog should allocate a separate command profile.

Roberto Manes May 16, 2005 - 9:43 AM

I sent to your support email the complete project. However just to help you a bit more the dialog is a pop-up dialog (style overlapped) over the MDI frame window with its own command profile, menu bar and tools bar. I’m using the document/view architecture. When there are some document opened if the focus is onto a document I can catch the message coming from the accelerator. If the focus is over the dialog (documents opened or closed it makes no difference) I can catch the message only if I select the function from the dialog menu. The accelerator implemented refers to the ID_EDIT_COPY identifier implemented onto both dialog and document menus. Thanks for your help

Technical Support May 17, 2005 - 2:22 AM

We sent you an updated project by e-mail. The solution deals only with MFC’s message pre-translation and command routing mechanisms. We added the code that redirects calls of PreTranslareMessage() and OnCmdMsg() from the main frame window to the pop-up non-modal dialog which is now created only on the first demand. This dialog now manages its own accelerator table and uses it in the message pre-translation process. The dialog also sends the WM_CLOSE message to itself at the end of the OnInitDialog() method. This is a tricky technique of initializing the pop-up tool window. We also added layout recalculation to the WM_SIZE handler and made dialog clipping all the child windows.

Roberto Manes May 24, 2005 - 6:50 AM

Thanks