Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Call Menu Function OnUpdate

Posted on 2011-02-22
4
324 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

839 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