首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

帮小弟我看下异常,还不是一般的错,第一次看到错到弹出对话框

2012-02-13 
帮我看下错误,还不是一般的错,第一次看到错到弹出对话框#includeAFXWIN.hclassDraw_K:publicCFrameWnd{p

帮我看下错误,还不是一般的错,第一次看到错到弹出对话框
#include   <AFXWIN.h>
class   Draw_K:public   CFrameWnd
{
public:
      afx_msg   void   OnLButtonDown(UINT   nFlags,CPoint   point)
      {SetCapture();}
     
      afx_msg   void   OnMouseMove   (UINT   nFlags,CPoint   point)
      {   if   (this   ==   GetCapture())
{       CClientDC   aDC   (this)   ;
        aDC.SetPixel(point,RGB(255,0,0));
}
      }

      afx_msg   void   OnLButtonUp   (UINT   nFlags,CPoint   point)
      {ReleaseCapture();}

      DECLARE_MESSAGE_MAP   ()
};

BEGIN_MESSAGE_MAP   (Draw_K,CFrameWnd)
    ON_WM_LBUTTONDOWN   ()
    ON_WM_MOUSEMOVE()
    ON_WM_LBUTTONUP()
END_MESSAGE_MAP   ()


class   MyDraw   :   public   CWinApp
{
        public:
BOOL   InitInstance()
{
CFrameWnd   *Frame   =   new   Draw_K;
        m_pMainWnd   =Frame;
Frame-> ShowWindow(SW_SHOW);    
return   true   ;
}
}a_app;


弹出的对话框有提到   debug   assertion   failed

program:生成的文件路径
file:winocc.cpp
line:301

麻烦问下哪里错了,我做的是WIN30   application     use   MFC   in   a   static   library     的工程


[解决办法]
win32 console application!!!

热点排行