home *** CD-ROM | disk | FTP | other *** search
/ ftp.funduc.com / 2014.08.ftp.funduc.com.tar / ftp.funduc.com / fshedcode-072212.zip / ColorsPage.cpp < prev    next >
C/C++ Source or Header  |  2010-09-13  |  3KB  |  77 lines

  1. /////////////////////////////////////////////////////////////////////////////
  2. //    License (GPLv2+):
  3. //    This program is free software; you can redistribute it and/or modify
  4. //    it under the terms of the GNU General Public License as published by
  5. //    the Free Software Foundation; either version 2 of the License, or
  6. //    (at your option) any later version.
  7. //
  8. //    This program is distributed in the hope that it will be useful, but
  9. //    WITHOUT ANY WARRANTY; without even the implied warranty of
  10. //    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  11. //    General Public License for more details.
  12. //
  13. //    You should have received a copy of the GNU General Public License
  14. //    along with this program; if not, write to the Free Software
  15. //    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  16. /////////////////////////////////////////////////////////////////////////////
  17.  
  18. #include "stdafx.h"
  19. #include "fshed.h"
  20. #include "ColorsPage.h"
  21.  
  22. #ifdef _DEBUG
  23. #define new DEBUG_NEW
  24. #undef THIS_FILE
  25. static char THIS_FILE[] = __FILE__;
  26. #endif
  27.  
  28. /////////////////////////////////////////////////////////////////////////////
  29. // CColorsPage property page
  30.  
  31. IMPLEMENT_DYNCREATE(CColorsPage, CPropertyPage)
  32.  
  33. CColorsPage::CColorsPage() : CPropertyPage(CColorsPage::IDD)
  34. {
  35.     //{{AFX_DATA_INIT(CColorsPage)
  36.         // NOTE: the ClassWizard will add member initialization here
  37.     //}}AFX_DATA_INIT
  38. }
  39.  
  40. CColorsPage::~CColorsPage()
  41. {
  42. }
  43.  
  44. void CColorsPage::DoDataExchange(CDataExchange* pDX)
  45. {
  46.     CPropertyPage::DoDataExchange(pDX);
  47.     //{{AFX_DATA_MAP(CColorsPage)
  48.     DDX_Control(pDX, IDC_CLR_TEXT, m_clrbtnText);
  49.     DDX_Control(pDX, IDC_CLR_SEP, m_clrbtnSep);
  50.     DDX_Control(pDX, IDC_CLR_SELBACK, m_clrbtnSelBack);
  51.     DDX_Control(pDX, IDC_CLR_SEL, m_clrbtnSel);
  52.     DDX_Control(pDX, IDC_CLR_BOOKMARK, m_clrbtnBookmark);
  53.     DDX_Control(pDX, IDC_CLR_BACK, m_clrbtnBack);
  54.     //}}AFX_DATA_MAP
  55. }
  56.  
  57.  
  58. BEGIN_MESSAGE_MAP(CColorsPage, CPropertyPage)
  59.     //{{AFX_MSG_MAP(CColorsPage)
  60.     ON_BN_CLICKED(IDC_RESET, OnReset)
  61.     //}}AFX_MSG_MAP
  62. END_MESSAGE_MAP()
  63.  
  64. /////////////////////////////////////////////////////////////////////////////
  65. // CColorsPage message handlers
  66.  
  67. void CColorsPage::OnReset() 
  68. {
  69.     m_clrbtnText.currentcolor = RGB (0,0,0);
  70.     m_clrbtnSep.currentcolor = RGB (192,192,192);
  71.     m_clrbtnSelBack.currentcolor = RGB( 255, 255, 0 );
  72.     m_clrbtnSel.currentcolor = RGB( 0, 0, 0 );
  73.     m_clrbtnBookmark.currentcolor = RGB( 255, 0, 0 );
  74.     m_clrbtnBack.currentcolor = RGB (255,255,255);
  75.     Invalidate();
  76. }
  77.