OptionTreeRadioButton.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_RADIOBUTTON
  22. #define OT_RADIOBUTTON
  23. #if _MSC_VER > 1000
  24. #pragma once
  25. #endif // _MSC_VER > 1000
  26. // OptionTreeRadioButton.h : header file
  27. //
  28. // Added Headers
  29. //#include "CommonRes.h"
  30. #include "OptionTreeDef.h"
  31. #include "OptionTreeItem.h"
  32. // Radio Button Node
  33. struct OT_RADIO_NODE
  34. {
  35. CString m_strText;
  36. BOOL m_bChecked;
  37. CRect m_rcHitRect;
  38. OT_RADIO_NODE *m_nNextNode;
  39. };
  40. // Classes
  41. class COptionTree;
  42. /////////////////////////////////////////////////////////////////////////////
  43. // COptionTreeRadioButton window
  44. class COptionTreeRadioButton : public CWnd
  45. {
  46. // Construction
  47. public:
  48. COptionTreeRadioButton();
  49. // Attributes
  50. public:
  51. // Operations
  52. public:
  53. // Overrides
  54. // ClassWizard generated virtual function overrides
  55. //{{AFX_VIRTUAL(COptionTreeRadioButton)
  56. //}}AFX_VIRTUAL
  57. // Implementation
  58. public:
  59. int Node_GetChecked();
  60. void Node_UnCheckAll();
  61. void SetRadioOptionsOwner(COptionTree *otOption);
  62. OT_RADIO_NODE *Node_FindNode(CString strText);
  63. OT_RADIO_NODE *Node_FindNode(int nIndex);
  64. void Node_DeleteAll();
  65. void Node_Insert(CString strText, BOOL bChecked);
  66. virtual ~COptionTreeRadioButton();
  67. protected:
  68. // Generated message map functions
  69. protected:
  70. OT_RADIO_NODE *m_nAllNodes;
  71. COptionTree *m_otRadioOption;
  72. //{{AFX_MSG(COptionTreeRadioButton)
  73. afx_msg BOOL OnEraseBkgnd(CDC* pDC);
  74. afx_msg void OnPaint();
  75. afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
  76. afx_msg void OnMove(int x, int y);
  77. afx_msg void OnSize(UINT nType, int cx, int cy);
  78. //}}AFX_MSG
  79. DECLARE_MESSAGE_MAP()
  80. };
  81. /////////////////////////////////////////////////////////////////////////////
  82. //{{AFX_INSERT_LOCATION}}
  83. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  84. #endif // !OT_RADIOBUTTON