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

Graph program

Development Platform:

Visual C++

  1. // COptionTree
  2. //
  3. // License
  4. // -------
  5. // This code is provided "as is" with no expressed or implied warranty.
  6. // 
  7. // You may use this code in a commercial product with or without acknowledgement.
  8. // However you may not sell this code or any modification of this code, this includes 
  9. // commercial libraries and anything else for profit.
  10. //
  11. // I would appreciate a notification of any bugs or bug fixes to help the control grow.
  12. //
  13. // History:
  14. // --------
  15. // See License.txt for full history information.
  16. //
  17. //
  18. // Copyright (c) 1999-2002 
  19. // ComputerSmarts.net 
  20. // mattrmiller@computersmarts.net
  21. #ifndef OT_CHECKBUTTON
  22. #define OT_CHECKBUTTON
  23. #if _MSC_VER > 1000
  24. #pragma once
  25. #endif // _MSC_VER > 1000
  26. // OptionTreeCheckButton.h : header file
  27. //
  28. // Added Headers
  29. #include "OptionTreeDef.h"
  30. #include "OptionTreeItem.h"
  31. // Classes
  32. class COptionTree;
  33. /////////////////////////////////////////////////////////////////////////////
  34. // COptionTreeCheckButton window
  35. class COptionTreeCheckButton : public CWnd
  36. {
  37. // Construction
  38. public:
  39. COptionTreeCheckButton();
  40. // Attributes
  41. public:
  42. // Operations
  43. public:
  44. // Overrides
  45. // ClassWizard generated virtual function overrides
  46. //{{AFX_VIRTUAL(COptionTreeCheckButton)
  47. //}}AFX_VIRTUAL
  48. // Implementation
  49. public:
  50. BOOL GetOption(DWORD dwOption);
  51. void SetOption(DWORD dwOption, BOOL bSet);
  52. void SetCheckOptionsOwner(COptionTree *otOption);
  53. BOOL GetCheck();
  54. void SetCheck(BOOL bCheck);
  55. CString GetCheckedText();
  56. CString GetUnCheckedText();
  57. void SetCheckText(CString strChecked, CString strUnChecked);
  58. virtual ~COptionTreeCheckButton();
  59. // Generated message map functions
  60. protected:
  61. CString m_strUnChecked;
  62. CString m_strChecked;
  63. BOOL m_bShowText;
  64. BOOL m_bShowCheck;
  65. BOOL m_bCheck;
  66. CRect m_rcCheck;
  67. COptionTree *m_otCheckOption;
  68. DWORD m_dwOptions;
  69. //{{AFX_MSG(COptionTreeCheckButton)
  70. afx_msg void OnPaint();
  71. afx_msg BOOL OnEraseBkgnd(CDC* pDC);
  72. afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
  73. //}}AFX_MSG
  74. DECLARE_MESSAGE_MAP()
  75. };
  76. /////////////////////////////////////////////////////////////////////////////
  77. //{{AFX_INSERT_LOCATION}}
  78. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  79. #endif // !OT_CHECKBUTTON