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

  1. // SendFxChorus.cpp : implementation file
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "tracker.h"
  6. #include "SendFxChorus.h"
  7. #include "isChorus.h"
  8.  
  9. #ifdef _DEBUG
  10. #define new DEBUG_NEW
  11. #undef THIS_FILE
  12. static char THIS_FILE[] = __FILE__;
  13. #endif
  14.  
  15. /////////////////////////////////////////////////////////////////////////////
  16. // CSendFxChorus dialog
  17.  
  18.  
  19. CSendFxChorus::CSendFxChorus(CWnd* pParent /*=NULL*/)
  20.     : CDialog(CSendFxChorus::IDD, pParent)
  21. {
  22.     //{{AFX_DATA_INIT(CSendFxChorus)
  23.         // NOTE: the ClassWizard will add member initialization here
  24.     //}}AFX_DATA_INIT
  25.     m_chorus = 0;
  26. }
  27.  
  28.  
  29. void CSendFxChorus::DoDataExchange(CDataExchange* pDX)
  30. {
  31.     CDialog::DoDataExchange(pDX);
  32.     //{{AFX_DATA_MAP(CSendFxChorus)
  33.         // NOTE: the ClassWizard will add DDX and DDV calls here
  34.     //}}AFX_DATA_MAP
  35. }
  36.  
  37.  
  38. BEGIN_MESSAGE_MAP(CSendFxChorus, CDialog)
  39.     //{{AFX_MSG_MAP(CSendFxChorus)
  40.     //}}AFX_MSG_MAP
  41. END_MESSAGE_MAP()
  42.  
  43. /////////////////////////////////////////////////////////////////////////////
  44. // CSendFxChorus message handlers
  45.  
  46. BOOL CSendFxChorus::OnInitDialog() 
  47. {
  48.     CDialog::OnInitDialog();
  49.  
  50.     if (!m_chorus)
  51.         return FALSE;
  52.     
  53.     // TODO: Add extra initialization here
  54.     
  55.     // Position?
  56.     POINT p;
  57.     p.x = 10;    
  58.     int spacing = 0;
  59.  
  60.     // TODO: Add your control notification handler code here
  61.     for (int i=0;i<6;i++) {
  62.         
  63.         if (i==0 || i == 3)
  64.             p.y = 20;
  65.         if (i < 3) 
  66.             p.x = 10;
  67.         else
  68.             p.x = 350;
  69.  
  70.         m_sliders[i].Create( IDD_EFFECTSLIDER, this );    
  71.         m_sliders[i].setRange( 0, 1 );
  72.         WINDOWPLACEMENT pm;
  73.         m_sliders[i].SetWindowPos( 0, p.x, p.y, 0, 0, SWP_NOSIZE | SWP_SHOWWINDOW );
  74.         m_sliders[i].GetWindowPlacement( &pm );        
  75.         p.y += pm.rcNormalPosition.bottom - pm.rcNormalPosition.top + spacing;
  76.  
  77.     }
  78.  
  79.     m_sliders[3].setRange( -1, 1 );
  80.     m_sliders[4].setRange( -1, 1 );
  81.     m_sliders[5].setRange( -1, 1 );
  82.  
  83.     m_sliders[0].setFloat( &m_chorus->speed );        m_sliders[0].setTitle( _T("Speed") );
  84.     m_sliders[1].setFloat( &m_chorus->depth );        m_sliders[1].setTitle( _T("Depth") );
  85.     m_sliders[2].setFloat( &m_chorus->spread );        m_sliders[2].setTitle( _T("Spread") );
  86.     m_sliders[3].setFloat( &m_chorus->feedback );    m_sliders[3].setTitle( _T("Feedback") );
  87.     m_sliders[4].setFloat( &m_chorus->volume );        m_sliders[4].setTitle( _T("Volume") );
  88.     m_sliders[5].setFloat( &m_chorus->dryMix );        m_sliders[5].setTitle( _T("Dry Mix") );
  89.     
  90.      
  91.     
  92.     
  93.     return TRUE;  // return TRUE unless you set the focus to a control
  94.                   // EXCEPTION: OCX Property Pages should return FALSE
  95. }
  96.  
  97. void CSendFxChorus::setChorus( isChorus *chorus )
  98. {
  99.     m_chorus = chorus;
  100. }
  101.