Solved

Call Menu Function OnUpdate

Posted on 2011-02-22
4
299 Views
Last Modified: 2012-05-11
Hello,
I would like to call a Menu Update Function in CMainFrame from another Function:

My Update Function is:
void CMainFrame::OnUpdate_Aufloesung1280x1024(CCmdUI *pCmdUI)
{
    pCmdUI->SetCheck(m_AufloesungAuswahl==CMainFrame::Auswahl_1);
}
This will be called if I choose this menu.....and the check box will set in this menu.


How can I call this Function from another Function in CMainFrame?
Please let me know.
Thank you.
500 points.
Best regards,
Thomas
0
Comment
Question by:tsp2002
  • 2
  • 2
4 Comments
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 34951734
This function should be called automatically when the menu is displayed - you don't have any need to call it yourself.  Do you mean you need to set the value of m_AufloesungAuswahl from elsewhere but don't know how to?
0
 

Author Comment

by:tsp2002
ID: 34951797
yes... that do I mean....and I think I  found the answer.
m_AufloesungAuswahl=1;
will do the trick
0
 
LVL 44

Accepted Solution

by:
AndyAinscow earned 500 total points
ID: 34951821
Yes, set the value of m_AufloesungAuswahl to be CMainFrame::Auswahl_1 if you want the check to be displayed on the menu point, setting it to another value will remove the check mark
0
 

Author Closing Comment

by:tsp2002
ID: 34951843
okay...thanks...sometimes you only need a hint
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

The following diagram presents a diamond class hierarchy: As depicted, diamond inheritance denotes when two classes (e.g., CDerived1 and CDerived2), separately extending a common base class (e.g., CBase), are sub classed simultaneously by a fourt…
In Easy String Encryption Using CryptoAPI in C++ (http://www.experts-exchange.com/viewArticle.jsp?aid=1193) I described how to encrypt text and recommended that the encrypted text be stored as a series of hexadecimal digits -- because cyphertext may…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

760 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

19 Experts available now in Live!

Get 1:1 Help Now