DrawObj.h 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796
  1. // CDrawObj.h: interface for the CDrawObj class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_CDRAWOBJ_H__4539C1EB_10FD_40B5_9BBC_22C008CEAF0F__INCLUDED_)
  5. #define AFX_CDRAWOBJ_H__4539C1EB_10FD_40B5_9BBC_22C008CEAF0F__INCLUDED_
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. #include "..\ChineseRes\ChineseRes\resource.h"
  10. #include "ReportColPage.h"
  11. //#include "Picture.h"
  12. #include "ImageEx.h"
  13. #include "shockwaveflash.h"
  14. class CGraph;
  15. struct LAYOUTSTRUCT
  16. {
  17. CRect rect; // m_rect (Normalized);
  18. int nX1; // m_rect.left (Normalized);
  19. int nX2; // m_rect.right (Normalized);
  20. int nY1; // m_rect.top (Normalized);
  21. int nY2; // m_rect.bottom(Normalized);
  22. int nXX; // m_rect.Width();
  23. int nYY; // m_rect.Height();
  24. int nX0; // 中心点X坐标;
  25. int nY0; // 中心点Y坐标;
  26. BOOL bHoriz; // 方向标志;
  27. BOOL bXInvert; // X方向反转标志;
  28. BOOL bYInvert; // Y方向反转标志;
  29. int nMinSize; // 可画的最小尺寸;
  30. };
  31. // 定义操作
  32. //---------------------------------------------- CAction -----------
  33. class CAction:public CObject
  34. {
  35. public:
  36. int m_nActionType;
  37. CString m_strVariant;
  38. CString m_strActionValue;
  39. CString m_strPicPath;
  40. DECLARE_SERIAL(CAction);
  41. CAction();
  42. virtual CAction* Clone(void);
  43. virtual void Serialize(CArchive& ar);
  44. CAction& operator=(CAction& action);
  45. };
  46. //////////////////////////////////////////////////////////////////////////
  47. //---------------------------------------------- CDrawObj -----------
  48. class CDrawObj:public CObject
  49. {
  50. public:
  51. DECLARE_SERIAL(CDrawObj);
  52. CDrawObj();
  53. public:
  54. CView* m_pView;
  55. CRect m_rect;
  56. public:
  57. static CStringArray drawsName;
  58. static CPtrArray drawsRuntimeClass;
  59. static void RegisterClass(CString strName,CRuntimeClass* pRuntimeClass);
  60. public:
  61. COLORREF m_clrFore; // 前景色
  62. COLORREF m_clrLine; // 线色
  63. COLORREF m_clrBack; // 背景色
  64. COLORREF m_clrFill; // 填充色
  65. LOGFONT m_logfont; // 字体
  66. CString m_strLineType; // 线型
  67. int m_nLineWidth; // 线宽
  68. CString m_strCaption; // 静态文本
  69. BOOL m_bVariant; // 是否是变量r
  70. BOOL m_bDynShow; // 是否动态显示
  71. CString m_strDynShow; // 动态显示条件
  72. BOOL m_bLocked;
  73. BOOL m_bAligned; // 用来等距排列的标志位
  74. // 动态参数
  75. COLORREF m_clrDynFore; // 前景色
  76. CString m_strDynForeCon;
  77. COLORREF m_clrDynBack;
  78. CString m_strDynBackCon;
  79. COLORREF m_clrDynLine;
  80. CString m_strDynLineCon;
  81. BOOL m_bDynFore;
  82. BOOL m_bDynBack;
  83. BOOL m_bDynLine;
  84. int m_nFillMode;
  85. CString m_strHoriPos;
  86. CString m_strHoriSize;
  87. CString m_strVertiPos;
  88. CString m_strVertiSize;
  89. BOOL m_bVertiSize;
  90. BOOL m_bVertiPos;
  91. BOOL m_bHorizSize;
  92. BOOL m_bHorizPos;
  93. int m_nHorAlign;
  94. int m_nVerAlign;
  95. // 动态值
  96. CRect m_rctCurrent;
  97. COLORREF m_clrCurrentFore;
  98. COLORREF m_clrCurrentBack;
  99. COLORREF m_clrCurrentLine;
  100. CString m_strCurrentCaption;
  101. BOOL m_bShow;
  102. float m_fCurrentValue;
  103. BOOL m_bShowtemp;//chn add 为了GIF,flasg,OCX的隐藏和显示
  104. // 动作属性
  105. CAction m_downAction;
  106. CAction m_upAction;
  107. CAction m_moveAction;
  108. BOOL m_bOnButtonUp;
  109. BOOL m_bOnButtonDown;
  110. BOOL m_bOnMove;
  111. //
  112. BOOL m_bHisFreshed;
  113. // 组合内动态缩放
  114. double m_dbLeftRate;
  115. double m_dbRightRate;
  116. double m_dbTopRate;
  117. double m_dbBottomRate;
  118. public:
  119. static BOOL bRuning; // 是否处于运行状态;
  120. BOOL m_bModifyMore; // 是否是编辑多个
  121. public:
  122. CDrawObj& operator=(CDrawObj& drawObj);
  123. virtual CDrawObj* Clone(void);
  124. virtual void Serialize(CArchive& ar);
  125. virtual BOOL OnAttrib(void);
  126. virtual BOOL OnAttrib(CPropertySheet& sheet);
  127. virtual void Draw(CDC* pDC);
  128. void DrawText(CDC* pDC);
  129. virtual bool Fresh( CRect &RECT );
  130. void DrawHKedu(CDC* pDC, CRect rect, int nKedu, COLORREF clrKedu);
  131. void DrawVKedu(CDC* pDC, CRect rect, int nKedu, COLORREF clrKedu);
  132. void DrawArcKedu(CDC* pDC, CRect rect, int nStartAngle, int nEndAngle, int nKedu, COLORREF clrKedu);
  133. public:
  134. LOGBRUSH GetBrush();
  135. void FillBack(CDC* pDC);
  136. void DrawFrame(CDC* pDC);
  137. void ProcessAction(int type);
  138. int GetPenStyle(CString penType);
  139. void Layout(BYTE Sharp,LAYOUTSTRUCT* pLayout);
  140. virtual int GetHandleCount(void);
  141. virtual CPoint GetHandle(int nHandle);
  142. CRect GetHandleRect(int nHandle);
  143. virtual HCURSOR GetHandleCursor();
  144. virtual void MoveTo(CRect rect);
  145. virtual void MoveHandleTo(int nHandle, CPoint point);
  146. virtual void DrawTracker(CDC* pDC);
  147. virtual int HitTest(CPoint point);
  148. virtual BOOL Intersects(CRect rect);
  149. virtual void Invalidate(void);
  150. };
  151. typedef CTypedPtrList<CObList, CDrawObj*> CDrawObjList;
  152. //---------------------------------------------- CDrawComposite ---
  153. class CDrawComposite:public CDrawObj
  154. {
  155. public:
  156. DECLARE_SERIAL(CDrawComposite);
  157. CDrawComposite();
  158. CDrawComposite(CDrawObjList &ObjList);
  159. ~CDrawComposite();
  160. public:
  161. CDrawComposite& operator=(CDrawComposite& drawObj);
  162. virtual CDrawObj* Clone(void);
  163. virtual void Serialize(CArchive& ar);
  164. virtual void Draw(CDC* pDC);
  165. virtual void MoveTo(CRect rect);
  166. public:
  167. CDrawObjList m_ObjList;
  168. };
  169. //---------------------------------------------- CDrawTLine -------
  170. class CDrawTLine:public CDrawObj
  171. {
  172. public:
  173. DECLARE_SERIAL(CDrawTLine);
  174. CDrawTLine();
  175. public:
  176. virtual CDrawObj* Clone(void);
  177. virtual void Draw(CDC* pDC);
  178. //virtual bool Fresh( CRect &RECT );
  179. };
  180. //---------------------------------------------- CDrawLine -------
  181. class CDrawLine:public CDrawObj
  182. {
  183. public:
  184. DECLARE_SERIAL(CDrawLine);
  185. CDrawLine();
  186. public:
  187. virtual CDrawObj* Clone(void);
  188. virtual void Draw(CDC* pDC);
  189. //virtual bool Fresh( CRect &RECT );
  190. };
  191. //---------------------------------------------- CDrawText --------
  192. class CDrawText:public CDrawObj
  193. {
  194. public:
  195. DECLARE_SERIAL(CDrawText);
  196. CDrawText();
  197. public:
  198. virtual CDrawObj* Clone(void);
  199. virtual void Draw(CDC* pDC);
  200. virtual void DrawText(CDC* pDC);
  201. virtual bool Fresh( CRect &RECT );
  202. };
  203. //---------------------------------------------- CDrawRect --------
  204. class CDrawRect:public CDrawObj
  205. {
  206. public:
  207. DECLARE_SERIAL(CDrawRect);
  208. CDrawRect();
  209. public:
  210. virtual CDrawObj* Clone(void);
  211. virtual void Draw(CDC* pDC);
  212. //virtual bool Fresh( CRect &RECT );
  213. };
  214. //---------------------------------------------- CDrawRoundRect --------
  215. class CDrawRoundRect:public CDrawObj
  216. {
  217. public:
  218. DECLARE_SERIAL(CDrawRoundRect);
  219. CDrawRoundRect();
  220. public:
  221. virtual CDrawObj* Clone(void);
  222. virtual void Draw(CDC* pDC);
  223. //virtual bool Fresh( CRect &RECT );
  224. };
  225. //---------------------------------------------- CDrawOval --------
  226. class CDrawOval:public CDrawObj
  227. {
  228. public:
  229. DECLARE_SERIAL(CDrawOval);
  230. CDrawOval();
  231. public:
  232. virtual CDrawObj* Clone(void);
  233. virtual void Draw(CDC* pDC);
  234. //virtual bool Fresh( CRect &RECT );
  235. };
  236. //---------------------------------------------- CDrawPie --------
  237. class CDrawPie:public CDrawObj
  238. {
  239. public:
  240. DECLARE_SERIAL(CDrawPie);
  241. CDrawPie();
  242. int m_nStartAngle;
  243. int m_nSweepAngle;
  244. public:
  245. virtual CDrawObj* Clone(void);
  246. virtual void Draw(CDC* pDC);
  247. virtual void Serialize(CArchive& ar);
  248. virtual BOOL OnAttrib(CPropertySheet& sheet);
  249. };
  250. //---------------------------------------------- CDrawFan --------
  251. class CDrawFan:public CDrawObj
  252. {
  253. public:
  254. DECLARE_SERIAL(CDrawFan);
  255. CDrawFan();
  256. public:
  257. virtual CDrawObj* Clone(void);
  258. virtual void Draw(CDC* pDC);
  259. virtual void Serialize(CArchive& ar);
  260. virtual bool Fresh( CRect &RECT );
  261. virtual BOOL OnAttrib(CPropertySheet& sheet);
  262. public:
  263. int m_nStep;
  264. bool m_bComputed;
  265. BOOL m_bRun;
  266. CPoint tagPoint[8];
  267. CString m_strLogic;
  268. };
  269. //---------------------------------------------- CDrawArc --------
  270. class CDrawArc:public CDrawObj
  271. {
  272. public:
  273. DECLARE_SERIAL(CDrawArc);
  274. CDrawArc();
  275. int m_nStartAngle;
  276. int m_nSweepAngle;
  277. public:
  278. virtual CDrawObj* Clone(void);
  279. virtual void Draw(CDC* pDC);
  280. virtual void Serialize(CArchive& ar);
  281. virtual BOOL OnAttrib(CPropertySheet& sheet);
  282. };
  283. //---------------------------------------------- CDrawPoly --------
  284. class CDrawPoly:public CDrawObj
  285. {
  286. public:
  287. DECLARE_SERIAL(CDrawPoly);
  288. CDrawPoly();
  289. ~CDrawPoly();
  290. int m_nPoints;
  291. int m_nAllocPoints;
  292. CPoint* m_points;
  293. public:
  294. void AddPoint(const CPoint& point);
  295. BOOL RecalcBounds();
  296. public:
  297. virtual CDrawObj* Clone(void);
  298. virtual void Draw(CDC* pDC);
  299. virtual void Serialize(CArchive& ar);
  300. virtual void MoveTo(CRect rect);
  301. virtual int GetHandleCount();
  302. virtual CPoint GetHandle(int nHandle);
  303. virtual void MoveHandleTo(int nHandle, CPoint point);
  304. };
  305. //---------------------------------------------- CDrawMLine --------
  306. class CDrawMLine:public CDrawPoly
  307. {
  308. public:
  309. DECLARE_SERIAL(CDrawMLine);
  310. CDrawMLine();
  311. public:
  312. virtual CDrawObj* Clone(void);
  313. virtual void Draw(CDC* pDC);
  314. };
  315. //---------------------------------------------- CDrawArrow -------
  316. class CDrawArrow:public CDrawObj
  317. {
  318. public:
  319. DECLARE_SERIAL(CDrawArrow);
  320. CDrawArrow();
  321. public:
  322. virtual CDrawObj* Clone(void);
  323. virtual void Draw(CDC* pDC);
  324. void DrawArrow(CDC* pDC, CRect rect, BYTE Direction,COLORREF clrArrow );
  325. };
  326. //---------------------------------------------- CDrawButton ------
  327. class CDrawButton:public CDrawObj
  328. {
  329. public:
  330. DECLARE_SERIAL(CDrawButton);
  331. CDrawButton();
  332. public:
  333. virtual CDrawObj* Clone(void);
  334. virtual void Draw(CDC* pDC);
  335. };
  336. //---------------------------------------------- CDrawBtnRadio ------
  337. class CDrawBtnRadio:public CDrawObj
  338. {
  339. public:
  340. DECLARE_SERIAL(CDrawBtnRadio);
  341. CDrawBtnRadio();
  342. public:
  343. virtual CDrawObj* Clone(void);
  344. virtual void Draw(CDC* pDC);
  345. };
  346. //---------------------------------------------- CDrawBtnCheck ------
  347. class CDrawBtnCheck:public CDrawObj
  348. {
  349. public:
  350. DECLARE_SERIAL(CDrawBtnCheck);
  351. CDrawBtnCheck();
  352. public:
  353. virtual CDrawObj* Clone(void);
  354. virtual void Draw(CDC* pDC);
  355. };
  356. //---------------------------------------------- CDraw3dCircle ------
  357. class CDraw3dCircle:public CDrawObj
  358. {
  359. public:
  360. DECLARE_SERIAL(CDraw3dCircle);
  361. CDraw3dCircle();
  362. public:
  363. virtual CDrawObj* Clone(void);
  364. virtual void Draw(CDC* pDC);
  365. };
  366. //---------------------------------------------- CDrawBreaker ------
  367. class CDrawBreaker:public CDrawObj
  368. {
  369. public:
  370. DECLARE_SERIAL(CDrawBreaker);
  371. CDrawBreaker();
  372. public:
  373. virtual CDrawObj* Clone(void);
  374. virtual void Draw(CDC* pDC);
  375. };
  376. //---------------------------------------------- CDrawSwitch ------
  377. class CDrawSwitch:public CDrawObj
  378. {
  379. public:
  380. DECLARE_SERIAL(CDrawSwitch);
  381. CDrawSwitch();
  382. public:
  383. virtual CDrawObj* Clone(void);
  384. virtual void Draw(CDC* pDC);
  385. virtual void Serialize(CArchive& ar);
  386. virtual bool Fresh( CRect &RECT );
  387. virtual BOOL OnAttrib(CPropertySheet& sheet);
  388. public:
  389. BOOL m_bRun;
  390. CString m_strLogic;
  391. };
  392. //---------------------------------------------- CDrawGrid ------
  393. class CDrawGrid:public CDrawObj
  394. {
  395. public:
  396. DECLARE_SERIAL(CDrawGrid);
  397. CDrawGrid();
  398. public:
  399. virtual CDrawObj* Clone(void);
  400. virtual void Draw(CDC* pDC);
  401. };
  402. //---------------------------------------------- CDrawTable ------
  403. class CDrawTable:public CDrawObj
  404. {
  405. public:
  406. DECLARE_SERIAL(CDrawTable);
  407. CDrawTable();
  408. BOOL m_bAddAve;
  409. BOOL m_bAddMax;
  410. BOOL m_bAddMin;
  411. int m_nType;
  412. BOOL m_bShowRowHead;
  413. CColProList m_colList;
  414. public:
  415. CString GetColFormat(int col);
  416. virtual CDrawObj* Clone(void);
  417. virtual void Draw(CDC* pDC);
  418. virtual void Serialize(CArchive& ar);
  419. virtual BOOL OnAttrib(CPropertySheet& sheet);
  420. };
  421. //---------------------------------------------- CDrawPipe ------
  422. class CDrawPipe:public CDrawObj
  423. {
  424. public:
  425. DECLARE_SERIAL(CDrawPipe);
  426. CDrawPipe();
  427. public:
  428. virtual CDrawObj* Clone(void);
  429. virtual void Draw(CDC* pDC);
  430. };
  431. //---------------------------------------------- CDrawZhePipe ------
  432. class CDrawZhePipe:public CDrawObj
  433. {
  434. public:
  435. DECLARE_SERIAL(CDrawZhePipe);
  436. CDrawZhePipe();
  437. public:
  438. virtual CDrawObj* Clone(void);
  439. virtual void Draw(CDC* pDC);
  440. };
  441. //---------------------------------------------- CDrawYPipe ------
  442. class CDrawYPipe:public CDrawObj
  443. {
  444. public:
  445. DECLARE_SERIAL(CDrawYPipe);
  446. CDrawYPipe();
  447. public:
  448. virtual CDrawObj* Clone(void);
  449. virtual void Draw(CDC* pDC);
  450. };
  451. //---------------------------------------------- CDrawBitmap ------
  452. class CDrawBitmap:public CDrawObj
  453. {
  454. public:
  455. DECLARE_SERIAL(CDrawBitmap);
  456. CDrawBitmap();
  457. ~CDrawBitmap();
  458. CString m_strDynFile;
  459. CString m_strStaticFile;
  460. BOOL m_bStretch;
  461. BOOL m_bDyn;
  462. CString m_strDynCondition;
  463. BOOL m_bUseDnyFile;
  464. // GDI+
  465. ImageEx* m_image;
  466. CString m_sOldFilePath;
  467. public:
  468. virtual CDrawObj* Clone(void);
  469. virtual void Draw(CDC* pDC);
  470. virtual bool Fresh( CRect &RECT );
  471. virtual void Serialize(CArchive& ar);
  472. virtual BOOL OnAttrib(CPropertySheet& sheet);
  473. BOOL DisplayBMP(CDC* pDC,int nX1,int nY1,int nXX,int nYY,CString strBMPFile,BOOL bStretch);
  474. BOOL DisplayJPG(CDC* pDC,int nX1,int nY1,int nXX,int nYY,CString strJPGFile,BOOL bStretch);
  475. BOOL DisplayPNG(CDC* pDC,int nX1,int nY1,int nXX,int nYY,CString strJPGFile,BOOL bStretch);
  476. BOOL DisplayGIF(CDC* pDC,int nX1,int nY1,int nXX,int nYY,CString strJPGFile,BOOL bStretch);
  477. };
  478. //---------------------------------------------- CDrawGif ------
  479. class CDrawGif:public CDrawObj
  480. {
  481. public:
  482. DECLARE_SERIAL(CDrawGif);
  483. CDrawGif();
  484. ~CDrawGif();
  485. // GDI+
  486. ImageEx* m_image;
  487. CString m_strDynFile;
  488. CString m_strStaticFile;
  489. BOOL m_bStretch;
  490. BOOL m_bDyn;
  491. CString m_strDynCondition;
  492. BOOL m_bUseDnyFile;
  493. //CPicture m_Picture;
  494. public:
  495. virtual CDrawObj* Clone(void);
  496. virtual void Draw(CDC* pDC);
  497. virtual bool Fresh( CRect &RECT );
  498. virtual void Serialize(CArchive& ar);
  499. virtual BOOL OnAttrib(CPropertySheet& sheet);
  500. };
  501. //---------------------------------------------- CDrawTransfer ------
  502. class CDrawTransfer:public CDrawObj
  503. {
  504. public:
  505. DECLARE_SERIAL(CDrawTransfer);
  506. CDrawTransfer();
  507. public:
  508. virtual CDrawObj* Clone(void);
  509. virtual void Draw(CDC* pDC);
  510. void DrawCircle(CDC *pDC, POINT origin, int radius);
  511. };
  512. //---------------------------------------------- CDrawData ------
  513. class CDrawDatabox:public CDrawObj
  514. {
  515. public:
  516. DECLARE_SERIAL(CDrawDatabox);
  517. CDrawDatabox();
  518. public:
  519. int m_nFormat;
  520. void DrawText(CDC* pDC,CString& strText);
  521. public:
  522. virtual CDrawObj* Clone(void);
  523. virtual void Draw(CDC* pDC);
  524. virtual void Serialize(CArchive& ar);
  525. virtual BOOL OnAttrib(CPropertySheet& sheet);
  526. virtual bool Fresh( CRect &RECT );
  527. };
  528. //---------------------------------------------- CDrawWatch ------
  529. class CDrawWatch:public CDrawObj
  530. {
  531. public:
  532. DECLARE_SERIAL(CDrawWatch);
  533. CDrawWatch();
  534. int m_nLowwer;
  535. int m_nUpper;
  536. CString m_strVar;
  537. LONG m_lAspectN;
  538. LONG m_lAspectD;
  539. INT HorzRes;
  540. INT VertRes;
  541. protected:
  542. void DrawText(CDC* pDC,CString& strText);
  543. public:
  544. virtual CDrawObj* Clone(void);
  545. virtual void Draw(CDC* pDC);
  546. virtual void Serialize(CArchive& ar);
  547. virtual BOOL OnAttrib(CPropertySheet& sheet);
  548. void DrawFace(CDC* pDC);
  549. };
  550. //---------------------------------------------- CDrawSingleBar ------
  551. class CDrawSingleBar:public CDrawObj
  552. {
  553. public:
  554. DECLARE_SERIAL(CDrawSingleBar);
  555. CDrawSingleBar();
  556. protected:
  557. void DrawText(CDC* pDC,CString& strText);
  558. public:
  559. int m_nLowwer;
  560. int m_nUpper;
  561. float m_fValue;
  562. virtual CDrawObj* Clone(void);
  563. virtual void Draw(CDC* pDC);
  564. virtual BOOL OnAttrib(CPropertySheet& sheet);
  565. };
  566. //---------------------------------------------- CDrawBar ---------
  567. class CDrawBar:public CDrawObj
  568. {
  569. public:
  570. DECLARE_SERIAL(CDrawBar);
  571. CDrawBar();
  572. public:
  573. COLORREF m_clrBar1;
  574. COLORREF m_clrBar2;
  575. COLORREF m_clrBar3;
  576. int m_nLowwer;
  577. int m_nUpper;
  578. CString m_strVar1;
  579. CString m_strVar2;
  580. CString m_strVar3;
  581. int m_nValue1;
  582. int m_nValue2;
  583. int m_nValue3;
  584. public:
  585. int GetBarNum();
  586. virtual bool Fresh( CRect &RECT );
  587. virtual CDrawObj* Clone(void);
  588. virtual void Draw(CDC* pDC);
  589. virtual void Serialize(CArchive& ar);
  590. void DrawBar(CDC* pDC,int data,int x1,int x2,COLORREF clrBar);
  591. virtual BOOL OnAttrib(CPropertySheet& sheet);
  592. };
  593. //---------------------------------------------- CDrawCurve ---------
  594. class CDrawCurve:public CDrawObj
  595. {
  596. public:
  597. DECLARE_SERIAL(CDrawCurve);
  598. CDrawCurve();
  599. public:
  600. COLORREF m_clrCurve1;
  601. COLORREF m_clrCurve2;
  602. COLORREF m_clrCurve3;
  603. int m_nLowwer;
  604. int m_nUpper;
  605. CString m_strVar1;
  606. CString m_strVar2;
  607. CString m_strVar3;
  608. int m_nValue1[60];
  609. int m_nValue2[60];
  610. int m_nValue3[60];
  611. int m_nSecond;
  612. public:
  613. virtual bool Fresh( CRect &RECT );
  614. virtual CDrawObj* Clone(void);
  615. virtual void Draw(CDC* pDC);
  616. void DrawCurve(CDC* pDC, CRect rect, int* data, COLORREF color);
  617. virtual void Serialize(CArchive& ar);
  618. virtual BOOL OnAttrib(CPropertySheet& sheet);
  619. };
  620. //---------------------------------------------- CDrawHisCurve ---------
  621. class CDrawHisCurve:public CDrawObj
  622. {
  623. public:
  624. DECLARE_SERIAL(CDrawHisCurve);
  625. CDrawHisCurve();
  626. public:
  627. COLORREF m_clrCurve1;
  628. COLORREF m_clrCurve2;
  629. COLORREF m_clrCurve3;
  630. int m_nLowwer;
  631. int m_nUpper;
  632. CString m_strVar1;
  633. CString m_strVar2;
  634. CString m_strVar3;
  635. int m_nValue1[60];
  636. int m_nValue2[60];
  637. int m_nValue3[60];
  638. int m_nSecond;
  639. public:
  640. virtual bool Fresh( CRect &RECT );
  641. virtual CDrawObj* Clone(void);
  642. virtual void Draw(CDC* pDC);
  643. void DrawCurve(CDC* pDC, CRect rect, int* data, COLORREF color);
  644. virtual void Serialize(CArchive& ar);
  645. virtual BOOL OnAttrib(CPropertySheet& sheet);
  646. };
  647. //---------------------------------------------- CDrawOCX --------
  648. class CDrawOCX:public CDrawObj
  649. {
  650. public:
  651. DECLARE_SERIAL(CDrawOCX);
  652. CDrawOCX();
  653. CString m_strOcxPath;
  654. int m_nOcxIndex;
  655. public:
  656. virtual CDrawObj* Clone(void);
  657. virtual void Draw(CDC* pDC);
  658. virtual void DrawText(CDC* pDC);
  659. virtual BOOL OnAttrib(CPropertySheet& sheet);
  660. virtual void Serialize(CArchive& ar);
  661. virtual bool Fresh( CRect &RECT );
  662. };
  663. //---------------------------------------------- CDrawFlash --------
  664. class CDrawFlash:public CDrawObj
  665. {
  666. public:
  667. DECLARE_SERIAL(CDrawFlash);
  668. CDrawFlash();
  669. ~CDrawFlash();
  670. CShockwaveFlash *m_pCtrlFlash;
  671. CString m_strFlashPath;
  672. bool m_bFlashCreate;
  673. public:
  674. virtual CDrawObj* Clone(void);
  675. virtual void Draw(CDC* pDC);
  676. virtual void DrawText(CDC* pDC);
  677. virtual void Serialize(CArchive& ar);
  678. virtual BOOL OnAttrib(CPropertySheet& sheet);
  679. virtual bool Fresh( CRect &RECT );
  680. };
  681. #endif // !defined(AFX_CDRAWOBJ_H__4539C1EB_10FD_40B5_9BBC_22C008CEAF0F__INCLUDED_)