www.mxdraw.com
|
系统事件反应器
class CMxDrawSystemEventReactor;
MxDrawSystemEventReactor.h
例如: samplePropertyEditor中的例子.
// .h class CPESystemEventReactor : CMxDrawSystemEventReactor { public: virtual ~CPESystemEventReactor(void); virtual void OcxDlgCreateComplete(McApDocument* pDoc); protected: CPESystemEventReactor(void); private: static CPESystemEventReactor s_obj; }; // .cpp CPESystemEventReactor CPESystemEventReactor::s_obj; CPESystemEventReactor::~CPESystemEventReactor(void) { MxDraw::UnRegistSystemEventReactor(this); } CPESystemEventReactor::CPESystemEventReactor(void) { MxDraw::RegistSystemEventReactor(this); } void CPESystemEventReactor::OcxDlgCreateComplete(McApDocument* pDoc) { if(pDoc != NULL) { CWinMsg* pWndMsg = CWinMsgContainer::Instance().docData(pDoc); pWndMsg->Regist(); } }