Dialog Based Apps - Menu & Windows :: MFC 
Author Message
 Dialog Based Apps - Menu & Windows :: MFC

Hi.

I have two questions about a dialog based app.

1) How do you add an "About" menu item? For example, a
dialog based app features an About class by default. I
added a "File" menu. However, the "About" menu does not
show up. I could add an "About" menu item, but how do you
connect the menu command to the "About" window. In other
words, how do you draw the "About" window as the user
selects "About?"

2) When you create a dialog based app, AppWizard gives the
options to have minimize, maximize, etc. Is there a way to
add and/or remove one or more of those features using
code? I did not add a feature to minimize, however, now I
want to minimize the window. It is too late to use
AppWizard.

Thanks,
Kuphryn



Fri, 25 Feb 2005 18:57:04 GMT  
 Dialog Based Apps - Menu & Windows :: MFC

Quote:
>I have two questions about a dialog based app.

>1) How do you add an "About" menu item?

Kuphryn,

A MFC dialog application appends the About menu to the dialog's system
menu.

Quote:
> For example, a
>dialog based app features an About class by default. I
>added a "File" menu. However, the "About" menu does not
>show up. I could add an "About" menu item, but how do you
>connect the menu command to the "About" window.

Just handle the WM_COMMAND message for the menu ID and use the same
code that's already displaying the dialog in the OnSysCommand handler.

Quote:
>2) When you create a dialog based app, AppWizard gives the
>options to have minimize, maximize, etc. Is there a way to
>add and/or remove one or more of those features using
>code? I did not add a feature to minimize, however, now I
>want to minimize the window. It is too late to use
>AppWizard.

Open the dialog in the resource editor and give the dialog the styles
you want.

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq



Fri, 25 Feb 2005 20:03:53 GMT  
 Dialog Based Apps - Menu & Windows :: MFC
    Just create a CFormView based SDI application and copy your dialog's
code to the newly created SDI application. It is easier than trying to add
menus to dialog and modifying the dialog's properties.

--
Cheers
Check Abdoul
----------------


Quote:
> Hi.

> I have two questions about a dialog based app.

> 1) How do you add an "About" menu item? For example, a
> dialog based app features an About class by default. I
> added a "File" menu. However, the "About" menu does not
> show up. I could add an "About" menu item, but how do you
> connect the menu command to the "About" window. In other
> words, how do you draw the "About" window as the user
> selects "About?"

> 2) When you create a dialog based app, AppWizard gives the
> options to have minimize, maximize, etc. Is there a way to
> add and/or remove one or more of those features using
> code? I did not add a feature to minimize, however, now I
> want to minimize the window. It is too late to use
> AppWizard.

> Thanks,
> Kuphryn



Fri, 25 Feb 2005 20:18:45 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Dialog Based & Menu Update :: MFC

2. PBM: Message box not displayed after main dialog box is closed in MFC dialog-based app

3. Dialog based app menu

4. Pop up menu in Dialog based App

5. trying to add menu to dialog based app

6. Newbie : Adding Menu Bar and Tool Bar to Dialog Based App

7. creating pop-up menus with dialog based apps gets assert error

8. Disabling main menu items in MFC based apps

9. Menu enabling in Dialog-based app

10. Using a Menu in a Dialog-based app

11. menu in Dialog based app

12. Checking menu items in dialog based app.

 

 
Powered by phpBB® Forum Software