From: JCO on
Question One
Why when I add a menu, the dialog size cuts off the bottom so that only half
of the buttons (Ok & Cancel) show?
I guess when the toolbar is added across the top, the dialog does not
compensate.

Question Two
When adding a menu Help->About, is there a way to invoke the system menu
that is already hidden in the upper left corner icon? You can mouse over
the icon and get this menu to display. Just wondering if I should access
that code instead of my own:
CAboutDlg dlgAbout;
dlgAbout.DoModal();

Thanks

From: JCO on
Added Information:
This is the only code I've added (not sure if correct). This is in the
OnInitDialog(). The menu was added using the Resource and I used the Menu
Designer. My understanding.... if it is part of the resource, you don't use
the Create(), hence, you're loading an existing menu.

..... other code
// TODO: Add extra initialization here

//Create temp menu item
CMenu muMenu;

//Load the new menu that was created from the resource
muMenu.LoadMenu( IDR_MENU1 );
ASSERT(muMenu);

//Add the new menu
SetMenu( &muMenu );

//Assign default menu
muMenu.m_hMenu = muMenu.GetSafeHmenu();

//Detach handle from CMenu so that it won't be destroyed when out of scope
muMenu.Detach();

..... other code

"JCO" <someone(a)somewhere.com> wrote in message
news:OKemKv#8KHA.5412(a)TK2MSFTNGP06.phx.gbl...
> Question One
> Why when I add a menu, the dialog size cuts off the bottom so that only
> half of the buttons (Ok & Cancel) show?
> I guess when the toolbar is added across the top, the dialog does not
> compensate.
>
> Question Two
> When adding a menu Help->About, is there a way to invoke the system menu
> that is already hidden in the upper left corner icon? You can mouse over
> the icon and get this menu to display. Just wondering if I should access
> that code instead of my own:
> CAboutDlg dlgAbout;
> dlgAbout.DoModal();
>
> Thanks

From: JCO on
Problem RESOLVED about the Menu pushing the dialog down and cutting off the
buttons at the bottom.
I did not know that you do not need any code at all for the menu. On the
dialog property page, you can set a menu property to your ID (IDR_MENU1).
This not only loads the menu, it allows for the dialog to properly redraw
itself to make room for the menu bar.

I would still like to understand why the written code is not working. I
should be able to switch menus if necessary. But the redrawing of the
dialog is messing me up. So I still need help in that area.
Thanks for listening!!

"JCO" <someone(a)somewhere.com> wrote in message
news:OKemKv#8KHA.5412(a)TK2MSFTNGP06.phx.gbl...
> Question One
> Why when I add a menu, the dialog size cuts off the bottom so that only
> half of the buttons (Ok & Cancel) show?
> I guess when the toolbar is added across the top, the dialog does not
> compensate.
>
> Question Two
> When adding a menu Help->About, is there a way to invoke the system menu
> that is already hidden in the upper left corner icon? You can mouse over
> the icon and get this menu to display. Just wondering if I should access
> that code instead of my own:
> CAboutDlg dlgAbout;
> dlgAbout.DoModal();
>
> Thanks

From: Joseph M. Newcomer on
On Sat, 15 May 2010 00:02:16 -0500, "JCO" <someone(a)somewhere.com> wrote:

>Question One
>Why when I add a menu, the dialog size cuts off the bottom so that only half
>of the buttons (Ok & Cancel) show?
>I guess when the toolbar is added across the top, the dialog does not
>compensate.
****
I've not seen this particular failure before. Are you adding the menu to the dialog style
in the dialog editor? You have not actually said what you meant by "add a menu". If you
just call SetMenu, then yes, this will happen
****
>
>Question Two
>When adding a menu Help->About, is there a way to invoke the system menu
>that is already hidden in the upper left corner icon? You can mouse over
>the icon and get this menu to display. Just wondering if I should access
>that code instead of my own:
> CAboutDlg dlgAbout;
> dlgAbout.DoModal();
****
That is the only way to do it. In a world in which there was the slightest example of
Intelligent Design being done, there would have been an about.h and about .cpp that
contained this dialog, but instead the code is stuplidly dropped inline in the program.
Furthermore, it doesn't conform to any of the Microsoft standards for "About" boxes,
although you might think it would. It is almost as if the design was done by somebody who
had been hired as a summer intern, rather than by a professional programmer.
joe
****
>
>Thanks
Joseph M. Newcomer [MVP]
email: newcomer(a)flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm