Posted on 2005-04-10
Last Modified: 2013-11-20
I'm an Newbee on MFC and try to develop my first application using RichEditCtrl.
When I start my MDI application one file is opened and the menu icons are activated.
If I close all views most of the icons will be disabled. Which window message handles that ?
And where can I found it in the class assistant under Visual C++ IDE.
Is it possible to start the RichEditCtrl Editor without one active RichEditView ? How can I change that ?

Thanks in advance
Question by:martinmoessner
    LVL 6

    Accepted Solution

    1. the message that handles the enabling and disabling of menu items and toolbar buttons is: ON_UPDATE_COMMAND_UI


    void CMainFrm::OnMyToolbarButton(CCmdUI* pCmdUI)



    2. For help on the topic u can search the MSDN for ON_UPDATE_COMMAND_UI

    3. The RichEditCtrl is embedded in RichEditView. If you need to create your own view then derive a class from CView and do the implementation yourself

    Hope this helps

    LVL 43

    Expert Comment

    Just a bit more to nabehs comment.
    By default the menu/toolbar item is enabled IF there is a handler function for that item.  You can use the ON_UPDATE_COMMAND_UI for the case that a function might only be allowed under certain conditions (eg, save is disabled when no changes have been made)

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    GIF file bit manipulation for color change 5 100
    Strange date stored 22 95
    while loop over for loop 7 69
    only14 challenge 19 57
    Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
    Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
    This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now