home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 November / CMCD1104.ISO / Software / Shareware / Programare / skincraft / SkinCrafter_v1.4.12_Demo.msi / _49E29CB9A65AABBF653C1037E1AA74B6 / _F7365B800D444B13810DA9D060FFEA11 < prev    next >
Encoding:
Text File  |  2004-06-29  |  2.5 KB  |  109 lines

  1. /******************************************************************
  2. $Archive: $
  3. $Workfile: $
  4. $Author: $
  5. $Date: $
  6. $Revision: $
  7. *******************************************************************/
  8.  
  9. #include "StdAfx.h"
  10. #include "resource.h"
  11. #include "MyPropertyPage3.h"
  12.  
  13. #ifdef _DEBUG
  14. #define new DEBUG_NEW
  15. #undef THIS_FILE
  16. static char THIS_FILE[] = __FILE__;
  17. #endif
  18.  
  19. /////////////////////////////////////////////////////////////////////////////
  20. // CMyPropertyPage3 property page
  21.  
  22. IMPLEMENT_DYNCREATE(CMyPropertyPage3, CPropertyPage)
  23.  
  24. CMyPropertyPage3::CMyPropertyPage3() : CPropertyPage(CMyPropertyPage3::IDD)
  25. {
  26.     //{{AFX_DATA_INIT(CMyPropertyPage3)
  27.     m_sample_check = FALSE;
  28.     //}}AFX_DATA_INIT
  29.     m_psp.dwFlags &= ~PSH_HASHELP;
  30. }
  31.  
  32. CMyPropertyPage3::~CMyPropertyPage3()
  33. {
  34. }
  35.  
  36. void CMyPropertyPage3::DoDataExchange(CDataExchange* pDX)
  37. {
  38.     CPropertyPage::DoDataExchange(pDX);
  39.     //{{AFX_DATA_MAP(CMyPropertyPage3)
  40.     DDX_Control(pDX, IDC_PROGRESS1, m_progress1);
  41.     DDX_Control(pDX, IDC_SLIDER2, m_slider2);
  42.     DDX_Control(pDX, IDC_SLIDER1, m_slider1);
  43.     DDX_Control(pDX, IDC_TAB4, m_ctlTab4);
  44.     DDX_Control(pDX, IDC_TAB1, m_ctlTab1);
  45.     DDX_Check(pDX, IDC_CHECK1, m_sample_check);
  46.     //}}AFX_DATA_MAP
  47. }
  48.  
  49. BEGIN_MESSAGE_MAP(CMyPropertyPage3, CPropertyPage)
  50.     //{{AFX_MSG_MAP(CMyPropertyPage3)
  51.     ON_WM_TIMER()
  52.     //}}AFX_MSG_MAP
  53. END_MESSAGE_MAP()
  54.  
  55. /////////////////////////////////////////////////////////////////////////////
  56. // CMyPropertyPage3 message handlers
  57.  
  58. BOOL CMyPropertyPage3::OnInitDialog() 
  59. {
  60.     CPropertyPage::OnInitDialog();
  61.  
  62.     CString str;
  63.     for ( int i = 0; i < 8; i++ )
  64.     {
  65.         str.Format( "Tab Ctrl %d", i );
  66.         m_ctlTab1.InsertItem( i, str );
  67.         m_ctlTab4.InsertItem( i, str );
  68.     }
  69.  
  70.     m_ctlTab1.ModifyStyle( 0, WS_CLIPCHILDREN );
  71.  
  72.     m_slider1.SetRange( 0, 50 );
  73.     m_slider1.SetPos( 5 );
  74.     m_slider2.SetRange( 0, 50 );
  75.     m_slider2.SetPos( 10 );
  76.     m_progress1.SetRange( 0, 50 );
  77.     m_progress1.SetPos( 6 );
  78.  
  79.     m_sample_check = TRUE;
  80.     SetTimer(1001, 100, NULL);
  81.  
  82.     return TRUE;
  83. }
  84.  
  85. void CMyPropertyPage3::OnTimer(UINT nIDEvent) 
  86. {
  87.     switch ( nIDEvent )
  88.     {
  89.     case 1001:
  90.         {
  91.             m_sample_check = !m_sample_check;
  92.             UpdateData(FALSE);
  93.             if ( m_slider1.GetPos()<50 )
  94.                 m_slider1.SetPos( m_slider1.GetPos()+2 );
  95.             else
  96.                 m_slider1.SetPos( 0 );
  97.             if ( m_slider2.GetPos()<49 )
  98.                 m_slider2.SetPos( m_slider2.GetPos()+1 );
  99.             else
  100.                 m_slider2.SetPos( 0 );
  101.             if ( m_progress1.GetPos()<50 )
  102.                 m_progress1.SetPos( m_progress1.GetPos()+1 );
  103.             else
  104.                 m_progress1.SetPos( 0 );
  105.         }
  106.     }
  107.     CPropertyPage::OnTimer(nIDEvent);
  108. }
  109.