不行,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应该可以吧
好像也不对,必须向windown才能send
CFrameWnd里有下面的函数不好用吗?CWnd* CreateView(CCreateContext* pContext, UINT nID = AFX_IDW_PANE_FIRST)
看一下CCmdTarget 怎么工作就行了
END_MESSAGE_MAP()
之中添加 ON_COMMAND(id,functionname)试试看
PostThreadMessage是可以的
在你的对话框地CPP文件头加上。
extern C***App theApp. theApp.OnFileNew();+ 回复人: ahr(电磁波) ( ) 信誉:100 2002-3-13 10:14:11 得分:0
在app中 加入一个public函数,在其中调用OnFileNew,:)
不就得了。呵呵