home *** CD-ROM | disk | FTP | other *** search
/ Mastering Visual Basic 5 / MasteringVisualBasic5.iso / protview / demowinx / data.1 / GUICTLS.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1996-10-29  |  6.0 KB  |  184 lines

  1. // GraphicalControls.cpp : implementation file
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "allctls.h"
  6. #include "GuiCtls.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. // CGraphicalControls dialog
  16.  
  17.  
  18. CGraphicalControls::CGraphicalControls(CWnd* pParent /*=NULL*/)
  19.     : CDialog(CGraphicalControls::IDD, pParent)
  20. {
  21.     //{{AFX_DATA_INIT(CGraphicalControls)
  22.     //}}AFX_DATA_INIT
  23. }
  24.  
  25.  
  26. void CGraphicalControls::DoDataExchange(CDataExchange* pDX)
  27. {
  28.     CDialog::DoDataExchange(pDX);
  29.     //{{AFX_DATA_MAP(CGraphicalControls)
  30.     DDX_Control(pDX, IDC_DIAL32CTRL1, m_dial1);
  31.     DDX_Control(pDX, IDC_DIAL32CTRL4, m_dial2);
  32.     DDX_Control(pDX, IDC_DIAL32CTRL5, m_dial3);
  33.     DDX_Control(pDX, IDC_PCTBAR32CTRL1, m_pctbar1);
  34.     DDX_Control(pDX, IDC_PCTBAR32CTRL2, m_pctbar2);
  35.     DDX_Control(pDX, IDC_PCTBAR32CTRL3, m_pctbar3);
  36.     //}}AFX_DATA_MAP
  37. }
  38.  
  39.  
  40. BEGIN_MESSAGE_MAP(CGraphicalControls, CDialog)
  41.     //{{AFX_MSG_MAP(CGraphicalControls)
  42.     //}}AFX_MSG_MAP
  43. END_MESSAGE_MAP()
  44.  
  45. /////////////////////////////////////////////////////////////////////////////
  46. // CGraphicalControls message handlers
  47.  
  48. BOOL CGraphicalControls::OnInitDialog() 
  49. {
  50.     CDialog::OnInitDialog();
  51.     
  52.     m_dial1.SetValue(25);
  53.     m_pctbar1.SetValue(25);
  54.     m_dial2.SetValue(50);
  55.     m_pctbar2.SetValue(50);
  56.     m_dial3.SetValue(75);
  57.     m_pctbar3.SetValue(75);
  58.     // TODO: Add extra initialization here
  59.     
  60.     return TRUE;  // return TRUE unless you set the focus to a control
  61.                   // EXCEPTION: OCX Property Pages should return FALSE
  62. }
  63.  
  64. BEGIN_EVENTSINK_MAP(CGraphicalControls, CDialog)
  65.     //{{AFX_EVENTSINK_MAP(CGraphicalControls)
  66.     ON_EVENT(CGraphicalControls, IDC_DIAL32CTRL1, 2 /* LineDown */, OnLineDownDial32ctrl1, VTS_I2 VTS_PI2)
  67.     ON_EVENT(CGraphicalControls, IDC_DIAL32CTRL1, 3 /* LineUp */, OnLineUpDial32ctrl1, VTS_I2 VTS_PI2)
  68.     ON_EVENT(CGraphicalControls, IDC_DIAL32CTRL1, 4 /* PageDown */, OnPageDownDial32ctrl1, VTS_I2 VTS_PI2)
  69.     ON_EVENT(CGraphicalControls, IDC_DIAL32CTRL1, 5 /* PageUp */, OnPageUpDial32ctrl1, VTS_I2 VTS_PI2)
  70.     ON_EVENT(CGraphicalControls, IDC_DIAL32CTRL1, 6 /* ThumbPosition */, OnThumbPositionDial32ctrl1, VTS_I2 VTS_PI2)
  71.     ON_EVENT(CGraphicalControls, IDC_DIAL32CTRL5, 2 /* LineDown */, OnLineDownDial32ctrl5, VTS_I2 VTS_PI2)
  72.     ON_EVENT(CGraphicalControls, IDC_DIAL32CTRL5, 3 /* LineUp */, OnLineUpDial32ctrl5, VTS_I2 VTS_PI2)
  73.     ON_EVENT(CGraphicalControls, IDC_DIAL32CTRL5, 4 /* PageDown */, OnPageDownDial32ctrl5, VTS_I2 VTS_PI2)
  74.     ON_EVENT(CGraphicalControls, IDC_DIAL32CTRL5, 5 /* PageUp */, OnPageUpDial32ctrl5, VTS_I2 VTS_PI2)
  75.     ON_EVENT(CGraphicalControls, IDC_DIAL32CTRL5, 6 /* ThumbPosition */, OnThumbPositionDial32ctrl5, VTS_I2 VTS_PI2)
  76.     ON_EVENT(CGraphicalControls, IDC_DIAL32CTRL4, 2 /* LineDown */, OnLineDownDial32ctrl4, VTS_I2 VTS_PI2)
  77.     ON_EVENT(CGraphicalControls, IDC_DIAL32CTRL4, 3 /* LineUp */, OnLineUpDial32ctrl4, VTS_I2 VTS_PI2)
  78.     ON_EVENT(CGraphicalControls, IDC_DIAL32CTRL4, 4 /* PageDown */, OnPageDownDial32ctrl4, VTS_I2 VTS_PI2)
  79.     ON_EVENT(CGraphicalControls, IDC_DIAL32CTRL4, 5 /* PageUp */, OnPageUpDial32ctrl4, VTS_I2 VTS_PI2)
  80.     ON_EVENT(CGraphicalControls, IDC_DIAL32CTRL4, 6 /* ThumbPosition */, OnThumbPositionDial32ctrl4, VTS_I2 VTS_PI2)
  81.     //}}AFX_EVENTSINK_MAP
  82. END_EVENTSINK_MAP()
  83.  
  84.  
  85. void CGraphicalControls::OnLineDownDial32ctrl1(short Position, short FAR* TurnDial) 
  86. {
  87.     m_pctbar1.SetValue(Position);
  88. }
  89.  
  90. void CGraphicalControls::OnLineUpDial32ctrl1(short Position, short FAR* TurnDial) 
  91. {
  92.     // TODO: Add your control notification handler code here
  93.     m_pctbar1.SetValue(Position);
  94. }
  95.  
  96. void CGraphicalControls::OnPageDownDial32ctrl1(short Position, short FAR* TurnDial) 
  97. {
  98.     // TODO: Add your control notification handler code here
  99.     m_pctbar1.SetValue(Position);
  100.     
  101. }
  102.  
  103. void CGraphicalControls::OnPageUpDial32ctrl1(short Position, short FAR* TurnDial) 
  104. {
  105.     // TODO: Add your control notification handler code here
  106.     m_pctbar1.SetValue(Position);
  107.     
  108. }
  109.  
  110. void CGraphicalControls::OnThumbPositionDial32ctrl1(short Position, short FAR* TurnDial) 
  111. {
  112.     // TODO: Add your control notification handler code here
  113.     m_pctbar1.SetValue(Position);
  114.     
  115. }
  116.  
  117. void CGraphicalControls::OnLineDownDial32ctrl5(short Position, short FAR* TurnDial) 
  118. {
  119.     // TODO: Add your control notification handler code here
  120.     m_pctbar3.SetValue(Position);    
  121. }
  122.  
  123. void CGraphicalControls::OnLineUpDial32ctrl5(short Position, short FAR* TurnDial) 
  124. {
  125.     // TODO: Add your control notification handler code here
  126.     m_pctbar3.SetValue(Position);    
  127.     
  128. }
  129.  
  130. void CGraphicalControls::OnPageDownDial32ctrl5(short Position, short FAR* TurnDial) 
  131. {
  132.     // TODO: Add your control notification handler code here
  133.     m_pctbar3.SetValue(Position);    
  134.     
  135. }
  136.  
  137. void CGraphicalControls::OnPageUpDial32ctrl5(short Position, short FAR* TurnDial) 
  138. {
  139.     // TODO: Add your control notification handler code here
  140.     m_pctbar3.SetValue(Position);    
  141.     
  142. }
  143.  
  144. void CGraphicalControls::OnThumbPositionDial32ctrl5(short Position, short FAR* TurnDial) 
  145. {
  146.     // TODO: Add your control notification handler code here
  147.     m_pctbar3.SetValue(Position);    
  148.     
  149. }
  150.  
  151. void CGraphicalControls::OnLineDownDial32ctrl4(short Position, short FAR* TurnDial) 
  152. {
  153.     // TODO: Add your control notification handler code here
  154.     m_pctbar2.SetValue(Position);    
  155. }
  156.  
  157. void CGraphicalControls::OnLineUpDial32ctrl4(short Position, short FAR* TurnDial) 
  158. {
  159.     // TODO: Add your control notification handler code here
  160.     m_pctbar2.SetValue(Position);    
  161.     
  162. }
  163.  
  164. void CGraphicalControls::OnPageDownDial32ctrl4(short Position, short FAR* TurnDial) 
  165. {
  166.     // TODO: Add your control notification handler code here
  167.     m_pctbar2.SetValue(Position);    
  168.     
  169. }
  170.  
  171. void CGraphicalControls::OnPageUpDial32ctrl4(short Position, short FAR* TurnDial) 
  172. {
  173.     // TODO: Add your control notification handler code here
  174.     m_pctbar2.SetValue(Position);    
  175.     
  176. }
  177.  
  178. void CGraphicalControls::OnThumbPositionDial32ctrl4(short Position, short FAR* TurnDial) 
  179. {
  180.     // TODO: Add your control notification handler code here
  181.     m_pctbar2.SetValue(Position);    
  182.     
  183. }
  184.