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 General Discussion » Why ProfUIS disable menu item? Collapse All
Subject Author Date
deimos Apr 9, 2003 - 8:44 AM

I asked:
I use program AllToTray, it adds to the application’s system menu item «Minimize To Tray». But ProfUIS disable this item. In other aplications it works.

You answered:
Prof-UIS does not disable anything. It is based on the standard MFC’s command updating mechanism. You should add appropriate ON_COMMAND and/or ON_UPDATE… methods into your window. This should not depend on application or window type.

How I can use the standard MFC’s command updating mechanism if the new item of the menu is added dynamically by application AllToTray?
Please, setup this applications from http://www.dntsoft.com/alltotray/AttSetup.exe and you will see what I mean.

Sergiy Lavrynenko Apr 9, 2003 - 10:33 AM

Hi,

Unfortunately I can not setup this application. This is not possible through avoiding potential problems with viruses. I can accept only the source code.

You can use the MFC’s command updating mechanism dynamically. This task is not very complicated. And you can find the answer to this problem in the CMainDlg::OnCmdMsg() method of the ProfUIS_Controls sample application. This is the dialog-based application with the color-selection toolbar at left-side of the main dialog. Color commands in this toolbar and their icons are allocated and handled dynamically. The CMainDlg::OnCmdMsg() method contains code for both CCmdUI object updating and WM_COMMAND message handling. Please read MSDN help for OnCmdMsg() virtual method to learn details about MFC command routing.

Best regards, Sergiy.