RoundButton.h
上传用户:hchw_8888
上传日期:2007-01-01
资源大小:23k
文件大小:2k
源码类别:

按钮控件

开发平台:

Visual C++

  1. #if !defined(AFX_ROUNDBUTTON_H__5254170E_59CF_11D1_ABBA_00A0243D1382__INCLUDED_)
  2. #define AFX_ROUNDBUTTON_H__5254170E_59CF_11D1_ABBA_00A0243D1382__INCLUDED_
  3. #if _MSC_VER >= 1000
  4. #pragma once
  5. #endif // _MSC_VER >= 1000
  6. // RoundButton.h : header file
  7. //
  8. // Round buttons!
  9. //
  10. // Written by Chris Maunder (Chris.Maunder@cbr.clw.csiro.au)
  11. // Copyright (c) 1998.
  12. //
  13. // This code may be used in compiled form in any way you desire. This
  14. // file may be redistributed unmodified by any means PROVIDING it is 
  15. // not sold for profit without the authors written consent, and 
  16. // providing that this notice and the authors name is included. If 
  17. // the source code in  this file is used in any commercial application 
  18. // then a simple email woulod be nice.
  19. //
  20. // This file is provided "as is" with no expressed or implied warranty.
  21. // The author accepts no liability if it causes any damage to your
  22. // computer, causes your pet cat to fall ill, increases baldness or
  23. // makes you car start emitting strange noises when you start it up.
  24. //
  25. // Expect bugs.
  26. // 
  27. // Please use and enjoy. Please let me know of any bugs/mods/improvements 
  28. // that you have found/implemented and I will fix/incorporate them into this
  29. // file. 
  30. //
  31. /////////////////////////////////////////////////////////////////////////////
  32. /////////////////////////////////////////////////////////////////////////////
  33. // CRoundButton window
  34. class CRoundButton : public CButton
  35. {
  36. // Construction
  37. public:
  38. CRoundButton();
  39. // Attributes
  40. public:
  41. // Operations
  42. public:
  43. // Overrides
  44. // ClassWizard generated virtual function overrides
  45. //{{AFX_VIRTUAL(CRoundButton)
  46. public:
  47. virtual void DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct);
  48. protected:
  49. virtual void PreSubclassWindow();
  50. //}}AFX_VIRTUAL
  51. // Implementation
  52. public:
  53. virtual ~CRoundButton();
  54. CRgn   m_rgn;
  55. CPoint m_ptCentre;
  56. CPoint m_ptLeft;
  57. CPoint m_ptRight;
  58. int    m_nRadius;
  59. BOOL   m_bDrawDashedFocusCircle;
  60. BOOL   m_bStretch;
  61. // Generated message map functions
  62. protected:
  63. //{{AFX_MSG(CRoundButton)
  64. //}}AFX_MSG
  65. DECLARE_MESSAGE_MAP()
  66. };
  67. /////////////////////////////////////////////////////////////////////////////
  68. //{{AFX_INSERT_LOCATION}}
  69. // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
  70. #endif // !defined(AFX_ROUNDBUTTON_H__5254170E_59CF_11D1_ABBA_00A0243D1382__INCLUDED_)