By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,594 Members | 3,459 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,594 IT Pros & Developers. It's quick & easy.

.NET IDR_MAINFRAME menu problem - application Help menu conflict with Excel Help menu

P: 1
I am working on .NET Version 2003 making an SDI application that calls MS Excel 2003.
I added a menu item called "MyApp Help" in the end of the menu bar to show Help-> About.

The application calls MS Excel, so the scenario is that I am supposed to see the Excel Menu bar,
FILE EDIT VIEW INSERT ... HELP.

I am able to see the menu bar, but in case of Help, I see the Help of Excel and help of my application, both as a submenu of help.

HELP
----
My App Help -> About MyApp
Excel Help -> Excel Help Submenu

PROBLEM: The Excel Help Submenu (like SHOW OFFICE ASSIATANT, DETECT & REPAIR, ACTIVATE PRODUCT) do exist and are clickable but nothing opens after clicking the submenu item.
However, If I first click on My App Help -> About MyApp and leave the About window open and then try the Excel Help submenu then the submenu items work.

This is the code I wrote:
RC File:
IDR_MAINFRAME MENU
BEGIN
POPUP "&File"
BEGIN
MENUITEM "Save &As...", ID_FILE_SAVE_AS
END
MENUITEM "&Section", ID_SECTION
POPUP "&Help"
BEGIN
MENUITEM "About MyApp", ID_HELP_ABOUT
END
END

About box (which pops on About MyApp)

// CSheetMFCCtrl::AboutBox - Display an "About" box to the user

void CSheetMFCCtrl::AboutBox()
{

CDialog dlgAbout(IDD_ABOUTBOX_SHEETMFC);
dlgAbout.DoModal(); //**
}


** DoModal seems to be the only option.
However the tiny about box that opens is not really modal. Whoe that is open one can click on Help-> Excel Help or anything else.

More information/description:
When I run the application, the MS EXcel Help attaches itself as the last child of the Help menu item, just below my menu item called "My App Help". When I click the "My App

Help" item, the pop up opens and works fine. If it remains open, then the MS Excel Help works fine (relevant popups show up). But, if I close my own Help popup, the MS Excel

Help does not work any more. I did not write any code to explicitly add the Excel Help, so I'm not sure how it came there in the first place.

Another thing that puzzles me is that the Help menu has 2 children:
Help
--> My App Name Help --> My App Help
--> Microsoft Excel Help --> ... sub menu items
Why did the "My App Name Help" appear here? I was expecting the "My App Help" to be a direct child of "Help".

It would be great to get some inputs on how to resolve this.
Thanks a lot.
Aug 2 '08 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.