inserting more options in a generated MFC project 
Author Message
 inserting more options in a generated MFC project

Hi,

I was wondering if it is possible ( and if so how ) to change the Menu
generated by a MFC project?

I need to distinctively open two files in a program, so I should have
something like:

File.Open.File1  ( and once the first file is open this option should be
deactivated )

File.Open.File2  ( possible option only after the first file was open )

How do you do this?

Thanks



Sun, 26 May 2002 03:00:00 GMT  
 inserting more options in a generated MFC project

Quote:

>Hi,

>I was wondering if it is possible ( and if so how ) to change the Menu
>generated by a MFC project?

>I need to distinctively open two files in a program, so I should have
>something like:

>File.Open.File1  ( and once the first file is open this option should be
>deactivated )

>File.Open.File2  ( possible option only after the first file was open )

>How do you do this?

>Thanks

Programs do this kind of thing every day. Menus are very dynamic, you
can easily switch various options on and off, according to where you
are in the program. Check the CMenu object, specifically the
EnableMenuItem() member function.

--
Tim Slattery
MS MVP(DTS)



Sun, 26 May 2002 03:00:00 GMT  
 inserting more options in a generated MFC project
Add a UPDATE_COMMAND_UI handler for the menuitem using the classwizard, and
enable/disable it there.
(EnableMenuItem will not work when MFC command update UI is active (it is by
default).


Quote:

> >Hi,

> >I was wondering if it is possible ( and if so how ) to change the Menu
> >generated by a MFC project?

> >I need to distinctively open two files in a program, so I should have
> >something like:

> >File.Open.File1  ( and once the first file is open this option should be
> >deactivated )

> >File.Open.File2  ( possible option only after the first file was open )

> >How do you do this?

> >Thanks

> Programs do this kind of thing every day. Menus are very dynamic, you
> can easily switch various options on and off, according to where you
> are in the program. Check the CMenu object, specifically the
> EnableMenuItem() member function.

> --
> Tim Slattery
> MS MVP(DTS)




Tue, 28 May 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. inserting more options in a generated MFC project

2. inserting more options in a generated MFC project

3. Optimization option (project release option)

4. BUG with VC7 RC1 with an MFC AppWizard generated CEditView project

5. problem with inserting ocx into mfc project

6. Inserting MS Calendar control into MFC project.

7. Project Settings->OLE Types, Setting Project Options problem

8. Generate Option in VC7

9. insert : Multiple-step OLE DB operation generated errors

10. HOWTO : Insert a property which handles embedded NULL chars in an ACTIVEX generated with VC++ 6.0

11. How to generate a PCMCIA insert Beep???

12. Duplicate Strings Merged (Options|Project|Compiler|Code Generation)

 

 
Powered by phpBB® Forum Software