Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 348
  • Last Modified:

Call Menu Function OnUpdate

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
tsp2002
Asked:
tsp2002
  • 2
  • 2
1 Solution
 
AndyAinscowCommented:
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
 
tsp2002Author Commented:
yes... that do I mean....and I think I  found the answer.
m_AufloesungAuswahl=1;
will do the trick
0
 
AndyAinscowCommented:
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
 
tsp2002Author Commented:
okay...thanks...sometimes you only need a hint
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now