在你的对话框地CPP文件头加上。
extern C***App theApp.theApp.OnFileNew()?哈哈

解决方案 »

  1.   

    不行,onfilenew protectedYou must add an ON_COMMAND( ID_FILE_NEW, OnFileNew ) statement to your CWinApp class message map to enable this member function.If enabled, this function handles execution of the File New command.sendMessage应该可以吧
      

  2.   

    好像也不对,必须向windown才能send
      

  3.   

    CFrameWnd里有下面的函数不好用吗?CWnd* CreateView(CCreateContext* pContext, UINT nID = AFX_IDW_PANE_FIRST)
      

  4.   

    在app中 加入一个public函数,在其中调用OnFileNew,:)
      

  5.   

    在CWinApp 类中添加消息映射,然后用SendMessage发送到主框架中,然后框架会把消息送到CWinApp中(好像是这样子,我记不大清楚了)在<<深入浅出MFC>>中说的很详细,自己看吧
      

  6.   

    CWinApp派生自CCmdTarget
    看一下CCmdTarget 怎么工作就行了
      

  7.   

    在 BEGIN_MESSAGE_MAP()
       END_MESSAGE_MAP()
    之中添加 ON_COMMAND(id,functionname)试试看
      

  8.   

    C***App是CWinThread派生的,所以用
    PostThreadMessage是可以的
      

  9.   

    回复人: dockbar(dock) (  ) 信誉:100  2002-3-13 9:30:01  得分:0  
     
     
      在你的对话框地CPP文件头加上。 
    extern C***App theApp. theApp.OnFileNew();+ 回复人: ahr(电磁波) (  ) 信誉:100  2002-3-13 10:14:11  得分:0  
     
     
      在app中 加入一个public函数,在其中调用OnFileNew,:) 
    不就得了。呵呵