eDrawDlg.h
上传用户:fjzzwyy
上传日期:2007-01-14
资源大小:244k
文件大小:3k
源码类别:

绘图程序

开发平台:

Visual C++

  1. // eDrawDlg.h : header file
  2. //
  3. //{{AFX_INCLUDES()
  4. #include "statusbar.h"
  5. #include "drawmethod.h"
  6. #include "CSBitmap.h"
  7. //}}AFX_INCLUDES
  8. #if !defined(AFX_EDRAWDLG_H__71A3619C_2682_49B6_ACE4_771FC083A53B__INCLUDED_)
  9. #define AFX_EDRAWDLG_H__71A3619C_2682_49B6_ACE4_771FC083A53B__INCLUDED_
  10. #if _MSC_VER > 1000
  11. #pragma once
  12. #endif // _MSC_VER > 1000
  13. #define LINEMODE_FREE 0
  14. #define LINEMODE_BPB 1
  15. #define LINEMODE_DDA 2
  16. #define LINEMODE_BRESENHAM 3
  17. #define LINEMODE_BROKEN 4
  18. #define LINEMODE_THICK 5
  19. #define DRAWMODE_FILL 0
  20. #define DRAWMODE_LINE 1
  21. #define DRAWMODE_POLY 2
  22. #define DRAWMODE_CIRCLE 3
  23. #define DRAWMODE_ELLIPSE 4
  24. #define DRAWMODE_PIPO 6
  25. #define DRAWMODE_ERASE 5
  26. #define CURSORMODE_PEN 1
  27. #define CURSORMODE_FILL 2
  28. #define CURSORMODE_POLY 3
  29. #define CURSORMODE_CIRCLE 4
  30. #define CURSORMODE_CROSS 5
  31. #define CURSORMODE_ERASE 6
  32. #define CURSORMODE_STANDARD 0
  33. /////////////////////////////////////////////////////////////////////////////
  34. // CEDrawDlg dialog
  35. #include "GfxOutBarCtrl.h"
  36. class CEDrawDlg : public CDialog
  37. {
  38. // Construction
  39. public:
  40. CEDrawDlg(CWnd* pParent = NULL); // standard constructor
  41. CGfxOutBarCtrl wndBar;   //Outlook风格窗口控件
  42. CImageList imaLarge, imaSmall,imaDisable,imaSunken;  //需要用的图象列表
  43. CBitmap currentClientBmp;
  44. CBrush m_BGBrush;
  45. bool m_isDrawing;
  46. int m_DrawMode;
  47. int m_CursorMode;
  48. int m_LineMode;
  49. PointType m_PolyPoint[100];
  50. int m_PolyPointCount,m_LastPolyPointCount;
  51. COLORREF m_CurrentPenColor,m_CurrentBGColor;
  52. PointType StartPoint,EndPoint;
  53. BOOL SaveCurrentClientToDC();
  54. BOOL RestoreClientFromDC();
  55. BOOL ClearClient();
  56. int m_Step;
  57. CSBitmap bitmap;
  58. // Dialog Data
  59. //{{AFX_DATA(CEDrawDlg)
  60. enum { IDD = IDD_EDRAW_DIALOG };
  61. CStatusBar1 m_statusAxis;
  62. //}}AFX_DATA
  63. // ClassWizard generated virtual function overrides
  64. //{{AFX_VIRTUAL(CEDrawDlg)
  65. protected:
  66. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  67. //}}AFX_VIRTUAL
  68. // Implementation
  69. protected:
  70. HICON m_hIcon;
  71. // Generated message map functions
  72. //{{AFX_MSG(CEDrawDlg)
  73. virtual BOOL OnInitDialog();
  74. afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
  75. afx_msg void OnPaint();
  76. afx_msg HCURSOR OnQueryDragIcon();
  77. afx_msg void OnMouseMove(UINT nFlags, CPoint point);
  78. afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
  79. afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
  80. afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
  81. afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
  82. afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
  83. //}}AFX_MSG
  84. afx_msg long OnOutbarNotify(WPARAM wParam,LPARAM lParam);  
  85. DECLARE_MESSAGE_MAP()
  86. };
  87. //{{AFX_INSERT_LOCATION}}
  88. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  89. #endif // !defined(AFX_EDRAWDLG_H__71A3619C_2682_49B6_ACE4_771FC083A53B__INCLUDED_)