home *** CD-ROM | disk | FTP | other *** search
/ Mastering Microsoft Visual C++ 4 (2nd Edition) / VisualC4.ISO / tabdemo / pitch.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  1995-09-30  |  1.3 KB  |  62 lines

  1. // Pitch.cpp : implementation file
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "TabDemo.h"
  6. #include "Pitch.h"
  7.  
  8. #ifdef _DEBUG
  9. #define new DEBUG_NEW
  10. #undef THIS_FILE
  11. static char THIS_FILE[] = __FILE__;
  12. #endif
  13.  
  14. /////////////////////////////////////////////////////////////////////////////
  15. // CPitch property page
  16.  
  17. IMPLEMENT_DYNCREATE(CPitch, CPropertyPage)
  18.  
  19. CPitch::CPitch() : CPropertyPage(CPitch::IDD)
  20. {
  21.    //{{AFX_DATA_INIT(CPitch)
  22.    m_Pitch = -1;
  23.    m_Spacing = 0;
  24.    //}}AFX_DATA_INIT
  25. }
  26.  
  27. CPitch::~CPitch()
  28. {
  29. }
  30.  
  31. void CPitch::DoDataExchange(CDataExchange* pDX)
  32. {
  33.    CPropertyPage::DoDataExchange(pDX);
  34.    //{{AFX_DATA_MAP(CPitch)
  35.    DDX_Control(pDX, IDC_SPACING, m_SpacingEdit);
  36.    DDX_Radio(pDX, IDC_VARIABLE, m_Pitch);
  37.    DDX_Text(pDX, IDC_SPACING, m_Spacing);
  38.    DDV_MinMaxInt(pDX, m_Spacing, 1, 3);
  39.    //}}AFX_DATA_MAP
  40. }
  41.  
  42.  
  43. BEGIN_MESSAGE_MAP(CPitch, CPropertyPage)
  44.    //{{AFX_MSG_MAP(CPitch)
  45.    //}}AFX_MSG_MAP
  46. END_MESSAGE_MAP()
  47.  
  48. /////////////////////////////////////////////////////////////////////////////
  49. // CPitch message handlers
  50.  
  51. BOOL CPitch::OnInitDialog() 
  52. {
  53.    CPropertyPage::OnInitDialog();
  54.    
  55.    // TODO: Add extra initialization here
  56.  
  57.    m_SpacingEdit.LimitText (1);
  58.    
  59.    return TRUE;  // return TRUE unless you set the focus to a control
  60.                  // EXCEPTION: OCX Property Pages should return FALSE
  61. }
  62.