1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

MENU Creation PROBLEM

Discussion in 'MFC' started by answerme, Aug 6, 2009.

  1. answerme

    answerme New Member

    Joined:
    Dec 17, 2007
    Messages:
    114
    Likes Received:
    0
    Trophy Points:
    0
    Hye All
    Iam facing problem regarding MENU creation in MFC visual studio 2008 .I have created a menu properly but not able to map .
    The Steps that i am following
    1: In resource file ->menu file ->IDR_MYTYPE
    2:there creating new menu
    3:IN ADD Event Handler adding putting the function name(or deafult it will have its own name) & selecting the class list
    then click on to ADD & EDIT BUTTON.
    4:On that CPP file IN BEGIN MESSAGE MAP {
    ON_COMMAND(ID_MYTYPE, &CScenGenView::OnMYTYPEXYZ)
    5: GIVING a meesagebox ,when i run that application it is not displaying messagebox
    BUT if i do the same process in mainframe.cpp ,messagebox getting displayed.

    ANy IDea how to solve it
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,285
    Likes Received:
    364
    Trophy Points:
    83
    If you are using the Wizard then it would be difficult to get the idea as to what goes wrong.

    first what is your project type ? Is it Dialog Based ?
     
  3. answerme

    answerme New Member

    Joined:
    Dec 17, 2007
    Messages:
    114
    Likes Received:
    0
    Trophy Points:
    0
    NO its not a dialog based ,its a SDI
     
  4. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,285
    Likes Received:
    364
    Trophy Points:
    83
    Then SDI has a default menu linked. You have to assign the menu to the window as well.
     

Share This Page