15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


Need the pointers to the Mainframe's different MENUS.

Devin Dow -- devin@rsi-inc.com
Monday, November 18, 1996

Environment: VC++4.1 on Windows95

The MFC framework has 2 menus for my MDI app: 1 for when there are MDI
windows open, and 1 for when there are no MDI windows.

Question:
** I am looking for the pointers to these menus (and the right click
popup). **

I use GetMenu() to get the active menu.  I am modifying the menus at run
time for foreign languages.  LoadMenu() will not work for me because if I
LoadMenu() and then modify it, it has no effect on the menu.  I know there
must be a list of menus, because if I use the pointer returned from
GetMenu() to modify the menu, the changes take effect; and if I close all
MDI windows, the other menu comes up, then I open a window, and my modified
menu is still modified like I want.
-- 
Thank You,
/=========================================================\
|Devin Dow - devin@rsi-inc.com                            |
|Router Solutions, Inc. - Interface tools for CAE/CAD/CAM |
|   __ _              http://www.rsi-inc.com              |
|  /  \.\ EVIN        Check Out CAMCAD for Windows        |
| / /\ \.\ OW                          __                 |
| \ \.\ \.\         o /    o          |\ \                |
|  \ \/ /./        /\|    /\|\        | \_\               |
|   \  /./          / >    < \          |  \    GOAL!!    |
|    \/./          '  ` o  '  `         |   \             |
\=========================================================/



Dan Jerghiuta -- danjer@POBoxes.com
Friday, November 22, 1996

This change of menus is made inside MFC. You'd better let it do the job.

I'm not sure what you want to change. If it's only replacing the text
of each menu item with a translation in another language, you can use 
a MFC feature: Each time a menu opens you receive a call to OnUpdateCmdUi
for each item. Besides enabling/disabling the item you can also change 
its text.

This will also apply the floating menus.

Dan Jerghiuta
danjer@POboxes.com

At 04:35 PM 11/18/96 -0800, you wrote:
>Environment: VC++4.1 on Windows95
>
>The MFC framework has 2 menus for my MDI app: 1 for when there are MDI
>windows open, and 1 for when there are no MDI windows.
>
>Question:
>** I am looking for the pointers to these menus (and the right click
>popup). **
>
>I use GetMenu() to get the active menu.  I am modifying the menus at run
>time for foreign languages.  LoadMenu() will not work for me because if I
>LoadMenu() and then modify it, it has no effect on the menu.  I know there
>must be a list of menus, because if I use the pointer returned from
>GetMenu() to modify the menu, the changes take effect; and if I close all
>MDI windows, the other menu comes up, then I open a window, and my modified
>menu is still modified like I want.
>-- 
>Thank You,
>/=========================================================\
>|Devin Dow - devin@rsi-inc.com                            |
>|Router Solutions, Inc. - Interface tools for CAE/CAD/CAM |
>|   __ _              http://www.rsi-inc.com              |
>|  /  \.\ EVIN        Check Out CAMCAD for Windows        |
>| / /\ \.\ OW                          __                 |
>| \ \.\ \.\         o /    o          |\ \                |
>|  \ \/ /./        /\|    /\|\        | \_\               |
>|   \  /./          / >    < \          |  \    GOAL!!    |
>|    \/./          '  ` o  '  `         |   \             |
>\=========================================================/
>





| Вернуться в корень Архива |