MDI程序中直接在CmainFrame中创建视图类到主窗口的窗户区,为什么视图类不能响应消息???为什么视图类不能接受操作?其中的按钮不能按???
void CMainFrame::OnTestMenu() 
{
// TODO: Add your command handler code here
CRect re;
CNOFrameView *m_View;
m_View=new CNOFrameView;
//this->GetWindowRect(&re);
this->GetClientRect(&re);
//m_View->Create("CNOFrameView","Test No Frame View Of MainFrame",WS_CHILD | WS_VISIBLE,CRect(0, 0, 200, 200),this,IDD_FORMVIEW,NULL);
m_View->Create("CNOFrameView",
"Test No Frame View Of MainFrame",
WS_CHILD | WS_VISIBLE,
re,
this,
IDD_FORMVIEW,
NULL);}class CNOFrameView : public CFormView
{
//protected:
public:
CNOFrameView();           // protected constructor used by dynamic creation
DECLARE_DYNCREATE(CNOFrameView)// Form Data
public:
//{{AFX_DATA(CNOFrameView)
enum { IDD = IDD_FORMVIEW };
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA// Attributes
public:// Operations
public:// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CNOFrameView)
public:
virtual BOOL Create(LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext = NULL);
protected:
virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
//}}AFX_VIRTUAL// Implementation
//protected:
public:
virtual ~CNOFrameView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif // Generated message map functions
//{{AFX_MSG(CNOFrameView)
afx_msg void OnButton1();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};