EditorSettingsDialog.h
Upload User: kairuinn
Upload Date: 2009-02-07
Package Size: 2922k
Code Size: 3k
Category:

Graph program

Development Platform:

Visual C++

  1. #if !defined(AFX_EDITORSETTINGSDIALOG_H__A4E7CD33_EE23_4A7A_A3A4_21C4A9565E37__INCLUDED_)
  2. #define AFX_EDITORSETTINGSDIALOG_H__A4E7CD33_EE23_4A7A_A3A4_21C4A9565E37__INCLUDED_
  3. #if _MSC_VER > 1000
  4. #pragma once
  5. #endif // _MSC_VER > 1000
  6. // EditorSettingsDialog.h : header file
  7. //
  8. #include "..//resource.h"
  9. #include "ColorStatic.h"
  10. #define MEASUREMENT_PIXEL 0
  11. #define MEASUREMENT_INCH 1
  12. #define MEASUREMENT_CENTIMETER 2
  13. #ifndef round
  14. #define round(a) ( int ) ( a + .5 )
  15. #endif
  16. /////////////////////////////////////////////////////////////////////////////
  17. // CEditorSettingsDialog dialog
  18. class CEditorSettingsDialog : public CDialog
  19. {
  20. // Construction
  21. public:
  22. CEditorSettingsDialog(CWnd* pParent = NULL);   // standard constructor
  23. // Dialog Data
  24. //{{AFX_DATA(CEditorSettingsDialog)
  25. enum { IDD = IDD_REPORT_DIALOG_SETTINGS };
  26. CEdit m_ctrlWidth;
  27. CEdit m_ctrlTop;
  28. CEdit m_ctrlRight;
  29. CEdit m_ctrlLeft;
  30. CEdit m_ctrlHeight;
  31. CEdit m_ctrlGridsize;
  32. CEdit m_ctrlBottom;
  33. CColorStatic m_ctrlMargin;
  34. CColorStatic m_ctrlGrid;
  35. CColorStatic m_ctrlBg;
  36. BOOL m_grid;
  37. BOOL m_snap;
  38. CString m_editBottom;
  39. CString m_editHeight;
  40. CString m_editLeft;
  41. CString m_editRight;
  42. CString m_editTop;
  43. CString m_editWidth;
  44. int m_restraint;
  45. int m_measurements;
  46. BOOL m_margins;
  47. UINT m_zoom;
  48. UINT m_zoomlevel;
  49. CString m_editGridsize;
  50. //}}AFX_DATA
  51. COLORREF m_colorBg;
  52. COLORREF m_colorGrid;
  53. COLORREF m_colorMargin;
  54. int m_left;
  55. int m_right;
  56. int m_top;
  57. int m_bottom;
  58. int m_width;
  59. int m_height;
  60. int m_gridsize;
  61. // Overrides
  62. // ClassWizard generated virtual function overrides
  63. //{{AFX_VIRTUAL(CEditorSettingsDialog)
  64. protected:
  65. virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  66. //}}AFX_VIRTUAL
  67. // Implementation
  68. protected:
  69. // Generated message map functions
  70. //{{AFX_MSG(CEditorSettingsDialog)
  71. afx_msg void OnButtonColorBg();
  72. afx_msg void OnButtonColorGrid();
  73. afx_msg void OnButtonColorMargin();
  74. afx_msg void OnButtonDefault();
  75. virtual BOOL OnInitDialog();
  76. afx_msg void OnSelchangeComboMeasurements();
  77. virtual void OnOK();
  78. //}}AFX_MSG
  79. DECLARE_MESSAGE_MAP()
  80. private:
  81. int m_currentMeasurement;
  82. void GetMeasurements();
  83. void SetMeasurementEdits();
  84. double m_xres;
  85. double m_yres;
  86. double m_cmx;
  87. double m_cmy;
  88. };
  89. //{{AFX_INSERT_LOCATION}}
  90. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  91. #endif // !defined(AFX_EDITORSETTINGSDIALOG_H__A4E7CD33_EE23_4A7A_A3A4_21C4A9565E37__INCLUDED_)