Ejemplo n.º 1
0
bool
ESChildSlider::Create(int nId, _Rect rRect, MercuryBaseView* pOwner, ESChildControl* pParent){
	if( ESChildControl::Create(nId, rRect, pOwner, pParent) ){
		if( pOwner->IsDesignerMode() ){
			// Register variable modify callback methods. {{
			AddVariableModifyCallBack(&m_bVerticalMode,	(VariableValueModifyCallback)&ESChildSlider::VerticalModeModify);
			// }}

			SetupSlider(0, 100, 1, false);
			}
		AdjustAttributesByVerticalMode(m_bVerticalMode);
		}
	return true;
	}
Ejemplo n.º 2
0
BOOL CInstrumentEditorVRC7::OnInitDialog()
{
	CDialog::OnInitDialog();

	CComboBox *pPatchBox = static_cast<CComboBox*>(GetDlgItem(IDC_PATCH));
	CString Text;

    const TCHAR* const PATCH_NAME[16] = {
        _T("(custom patch)"),
        _T("Bell"),
        _T("Guitar"),
        _T("Piano"),
        _T("Flute"),
        _T("Clarinet"),
        _T("Rattling Bell"),
        _T("Trumpet"),
        _T("Reed Organ"),
        _T("Soft Bell"),
        _T("Xylophone"),
        _T("Vibraphone"),
        _T("Brass"),
        _T("Bass Guitar"),
        _T("Synthesizer"),
        _T("Chorus")
    };

	for (int i = 0; i < 16; ++i) {
		Text.Format(_T("Patch #%i - %s"), i, PATCH_NAME[i]);
		pPatchBox->AddString(Text);
	}

	pPatchBox->SetCurSel(0);

	SetupSlider(IDC_M_MUL, 15);
	SetupSlider(IDC_C_MUL, 15);
	SetupSlider(IDC_M_KSL, 3);
	SetupSlider(IDC_C_KSL, 3);
	SetupSlider(IDC_TL, 63);
	SetupSlider(IDC_FB, 7);
	SetupSlider(IDC_M_AR, 15);
	SetupSlider(IDC_M_DR, 15);
	SetupSlider(IDC_M_SL, 15);
	SetupSlider(IDC_M_RR, 15);
	SetupSlider(IDC_C_AR, 15);
	SetupSlider(IDC_C_DR, 15);
	SetupSlider(IDC_C_SL, 15);
	SetupSlider(IDC_C_RR, 15);

	EnableControls(true);

	return TRUE;  // return TRUE unless you set the focus to a control
	// EXCEPTION: OCX Property Pages should return FALSE
}