home *** CD-ROM | disk | FTP | other *** search
- /******************************************************************
- $Archive: $
- $Workfile: $
- $Author: $
- $Date: $
- $Revision: $
- *******************************************************************/
-
- #include "StdAfx.h"
- #include "resource.h"
- #include "MyPropertyPage3.h"
-
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
-
- /////////////////////////////////////////////////////////////////////////////
- // CMyPropertyPage3 property page
-
- IMPLEMENT_DYNCREATE(CMyPropertyPage3, CPropertyPage)
-
- CMyPropertyPage3::CMyPropertyPage3() : CPropertyPage(CMyPropertyPage3::IDD)
- {
- //{{AFX_DATA_INIT(CMyPropertyPage3)
- m_sample_check = FALSE;
- //}}AFX_DATA_INIT
- m_psp.dwFlags &= ~PSH_HASHELP;
- }
-
- CMyPropertyPage3::~CMyPropertyPage3()
- {
- }
-
- void CMyPropertyPage3::DoDataExchange(CDataExchange* pDX)
- {
- CPropertyPage::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(CMyPropertyPage3)
- DDX_Control(pDX, IDC_PROGRESS1, m_progress1);
- DDX_Control(pDX, IDC_SLIDER2, m_slider2);
- DDX_Control(pDX, IDC_SLIDER1, m_slider1);
- DDX_Control(pDX, IDC_TAB4, m_ctlTab4);
- DDX_Control(pDX, IDC_TAB1, m_ctlTab1);
- DDX_Check(pDX, IDC_CHECK1, m_sample_check);
- //}}AFX_DATA_MAP
- }
-
- BEGIN_MESSAGE_MAP(CMyPropertyPage3, CPropertyPage)
- //{{AFX_MSG_MAP(CMyPropertyPage3)
- ON_WM_TIMER()
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
-
- /////////////////////////////////////////////////////////////////////////////
- // CMyPropertyPage3 message handlers
-
- BOOL CMyPropertyPage3::OnInitDialog()
- {
- CPropertyPage::OnInitDialog();
-
- CString str;
- for ( int i = 0; i < 8; i++ )
- {
- str.Format( "Tab Ctrl %d", i );
- m_ctlTab1.InsertItem( i, str );
- m_ctlTab4.InsertItem( i, str );
- }
-
- m_ctlTab1.ModifyStyle( 0, WS_CLIPCHILDREN );
-
- m_slider1.SetRange( 0, 50 );
- m_slider1.SetPos( 5 );
- m_slider2.SetRange( 0, 50 );
- m_slider2.SetPos( 10 );
- m_progress1.SetRange( 0, 50 );
- m_progress1.SetPos( 6 );
-
- m_sample_check = TRUE;
- SetTimer(1001, 100, NULL);
-
- return TRUE;
- }
-
- void CMyPropertyPage3::OnTimer(UINT nIDEvent)
- {
- switch ( nIDEvent )
- {
- case 1001:
- {
- m_sample_check = !m_sample_check;
- UpdateData(FALSE);
- if ( m_slider1.GetPos()<50 )
- m_slider1.SetPos( m_slider1.GetPos()+2 );
- else
- m_slider1.SetPos( 0 );
- if ( m_slider2.GetPos()<49 )
- m_slider2.SetPos( m_slider2.GetPos()+1 );
- else
- m_slider2.SetPos( 0 );
- if ( m_progress1.GetPos()<50 )
- m_progress1.SetPos( m_progress1.GetPos()+1 );
- else
- m_progress1.SetPos( 0 );
- }
- }
- CPropertyPage::OnTimer(nIDEvent);
- }
-