home *** CD-ROM | disk | FTP | other *** search
/ Large Pack of OldSkool DOS MOD Trackers / beaversweeper_v101.zip / src / TrackerControls.cpp < prev    next >
C/C++ Source or Header  |  2003-01-06  |  3KB  |  113 lines

  1. // TrackerControls.cpp : implementation file
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "tracker.h"
  6. #include "TrackerControls.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. // CTrackerControls dialog
  16.  
  17.  
  18. CTrackerControls::CTrackerControls(): CMyDialogBar()
  19. {
  20.     //{{AFX_DATA_INIT(CTrackerControls)
  21.     m_pjumpEdit = 1;
  22.     m_cpuUsage = 0.0f;
  23.     m_scrollData = TRUE;
  24.     m_bpm = 0;
  25.     m_pattick = 0;
  26.     m_seqtick = 0;
  27.     m_defvelocity = 0;
  28.     //}}AFX_DATA_INIT
  29.  
  30. }
  31.  
  32.  
  33. void CTrackerControls::DoDataExchange(CDataExchange* pDX)
  34. {
  35.     CMyDialogBar::DoDataExchange(pDX);
  36.     //{{AFX_DATA_MAP(CTrackerControls)
  37.     DDX_Text(pDX, IDC_EDIT_TCNTRL_PJUMP, m_pjumpEdit);
  38.     DDV_MinMaxInt(pDX, m_pjumpEdit, 0, 32);
  39.     DDX_Text(pDX, IDC_EDIT_CPUUSAGE, m_cpuUsage);
  40.     DDX_Check(pDX, IDC_CHECK_PLAY_SCROLL, m_scrollData);
  41.     DDX_Text(pDX, IDC_EDIT_BPM, m_bpm);
  42.     DDX_Text(pDX, IDC_EDIT_PATTICK, m_pattick);
  43.     DDX_Text(pDX, IDC_EDIT_SEQTICK, m_seqtick);
  44.     DDX_Text(pDX, IDC_EDIT_TCNTRL_VCITY, m_defvelocity);
  45.     //}}AFX_DATA_MAP
  46. }
  47.  
  48.  
  49. BEGIN_MESSAGE_MAP(CTrackerControls, CMyDialogBar)
  50.     //{{AFX_MSG_MAP(CTrackerControls)
  51.     ON_BN_CLICKED(IDC_CHECK_PLAY_SCROLL, OnCheckPlayScroll)
  52.     ON_WM_SIZE()
  53.     ON_WM_CANCELMODE()
  54.     //}}AFX_MSG_MAP
  55. END_MESSAGE_MAP()
  56.  
  57. /////////////////////////////////////////////////////////////////////////////
  58. // CTrackerControls message handlers
  59. /*
  60. LRESULT CTrackerControls::WindowProc( UINT message, WPARAM wParam, LPARAM lParam )
  61. {
  62.   LRESULT lResult = CMyDialogBar::WindowProc(message,wParam,lParam);
  63.  
  64.   if(::IsWindow(m_hWnd))
  65.   {
  66.     CWnd *pWnd = GetParent();
  67.     if (pWnd != NULL)
  68.     {
  69.       pWnd->SetWindowText((LPCSTR)caption);
  70.     }
  71.     
  72.   }
  73.  
  74.   return lResult;
  75. }
  76. */
  77.  
  78.  
  79. BOOL CTrackerControls::PreCreateWindow(CREATESTRUCT& cs) 
  80. {
  81.     // TODO: Add your specialized code here and/or call the base class
  82.   
  83.     return CMyDialogBar::PreCreateWindow(cs);
  84. }
  85.  
  86. //  m_pjumpSpin.SetRange(-32,32);
  87.  
  88. void CTrackerControls::OnCheckPlayScroll() 
  89. {
  90.     // TODO: Add your control notification handler code here
  91.   if (m_scrollData)
  92.     m_scrollData=FALSE;
  93.   else 
  94.     m_scrollData=TRUE;
  95. }
  96.  
  97. void CTrackerControls::OnSize(UINT nType, int cx, int cy) 
  98. {
  99.   CMyDialogBar::OnSize(nType, cx, cy);
  100.   OutputDebugString ("size\n");
  101.   
  102.     // TODO: Add your message handler code here
  103.     
  104. }
  105.  
  106. void CTrackerControls::OnCancelMode() 
  107. {
  108.     CMyDialogBar::OnCancelMode();
  109.     
  110.     // TODO: Add your message handler code here
  111.     
  112. }
  113.