#include <afxwin.h> #include "resource.h" class MyDocument : public CDocument { DECLARE_DYNCREATE(MyDocument)//声明run-time类 }; IMPLEMENT_DYNCREATE(MyDocument,CDocument)//声明MyDocument为run-time类 class MyView : public CView { public: void OnDraw(CDC * aDC