我已经在里面添加了,可是在里面输入任何字符或数字都会发生异常,为什么
m_command.AddView(_T("Command"),RUNTIME_CLASS(CMyView));class CMyView : public CHiliteEditView
{
protected:
DECLARE_DYNCREATE(CMyView)
public:
CMyView();     
public: public:
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
virtual void OnDraw(CDC* pDC);      // overridden to draw this view
protected:
DECLARE_MESSAGE_MAP()
};class CHiliteEditView : public CEditView
{
protected:
CHiliteEditView();           // protected constructor used by dynamic creation
DECLARE_DYNCREATE(CHiliteEditView)public:
int GetCaretLine() const; // return current caret line number
void GetLineRect(int nLine, LPRECT lpRect) const;
public:
public:
virtual void OnInitialUpdate();
virtual void DrawCaretLine(BOOL bInPaint = FALSE);protected:
virtual ~CHiliteEditView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
CSize m_sizeChar;
CFont m_fontDefault;
BOOL m_bCanPaint;
int m_nCaretLine;
protected:
afx_msg void OnPaint();
afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
afx_msg void OnMouseMove(UINT nFlags, CPoint point);
DECLARE_MESSAGE_MAP()
};

解决方案 »

  1.   

                mainret = WinMain(
    #endif  /* WPRFLAG */
                           (HINSTANCE)&__ImageBase,
                           NULL,
                           lpszCommandLine,
                           StartupInfo.dwFlags & STARTF_USESHOWWINDOW
                            ? StartupInfo.wShowWindow
                            : SW_SHOWDEFAULT
    在这里中断了