home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Large Pack of OldSkool DOS MOD Trackers
/
beaversweeper_v101.zip
/
src
/
SendFxChorus.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
2003-01-06
|
3KB
|
101 lines
// SendFxChorus.cpp : implementation file
//
#include "stdafx.h"
#include "tracker.h"
#include "SendFxChorus.h"
#include "isChorus.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CSendFxChorus dialog
CSendFxChorus::CSendFxChorus(CWnd* pParent /*=NULL*/)
: CDialog(CSendFxChorus::IDD, pParent)
{
//{{AFX_DATA_INIT(CSendFxChorus)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
m_chorus = 0;
}
void CSendFxChorus::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CSendFxChorus)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CSendFxChorus, CDialog)
//{{AFX_MSG_MAP(CSendFxChorus)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CSendFxChorus message handlers
BOOL CSendFxChorus::OnInitDialog()
{
CDialog::OnInitDialog();
if (!m_chorus)
return FALSE;
// TODO: Add extra initialization here
// Position?
POINT p;
p.x = 10;
int spacing = 0;
// TODO: Add your control notification handler code here
for (int i=0;i<6;i++) {
if (i==0 || i == 3)
p.y = 20;
if (i < 3)
p.x = 10;
else
p.x = 350;
m_sliders[i].Create( IDD_EFFECTSLIDER, this );
m_sliders[i].setRange( 0, 1 );
WINDOWPLACEMENT pm;
m_sliders[i].SetWindowPos( 0, p.x, p.y, 0, 0, SWP_NOSIZE | SWP_SHOWWINDOW );
m_sliders[i].GetWindowPlacement( &pm );
p.y += pm.rcNormalPosition.bottom - pm.rcNormalPosition.top + spacing;
}
m_sliders[3].setRange( -1, 1 );
m_sliders[4].setRange( -1, 1 );
m_sliders[5].setRange( -1, 1 );
m_sliders[0].setFloat( &m_chorus->speed ); m_sliders[0].setTitle( _T("Speed") );
m_sliders[1].setFloat( &m_chorus->depth ); m_sliders[1].setTitle( _T("Depth") );
m_sliders[2].setFloat( &m_chorus->spread ); m_sliders[2].setTitle( _T("Spread") );
m_sliders[3].setFloat( &m_chorus->feedback ); m_sliders[3].setTitle( _T("Feedback") );
m_sliders[4].setFloat( &m_chorus->volume ); m_sliders[4].setTitle( _T("Volume") );
m_sliders[5].setFloat( &m_chorus->dryMix ); m_sliders[5].setTitle( _T("Dry Mix") );
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CSendFxChorus::setChorus( isChorus *chorus )
{
m_chorus = chorus;
}