BOOL CWavProgressDlg::OnInitDialog()
{
	CDialog::OnInitDialog();

	static_cast<CProgressCtrl*>(GetDlgItem(IDC_PROGRESS_BAR))->SetRange(0, 100);
	CView *pView = static_cast<CFrameWnd*>(AfxGetMainWnd())->GetActiveView();		// // //
	CSoundGen *pSoundGen = theApp.GetSoundGenerator();

	pView->Invalidate();
	pView->RedrawWindow();

	// Start rendering
	CString FileStr;
	AfxFormatString1(FileStr, IDS_WAVE_PROGRESS_FILE_FORMAT, m_sFile);
	SetDlgItemText(IDC_PROGRESS_FILE, FileStr);

	if (!pSoundGen->RenderToFile(m_sFile.GetBuffer(), m_iSongEndType, m_iSongEndParam, m_iTrack))
		EndDialog(0);

	m_dwStartTime = GetTickCount();
	SetTimer(0, 200, NULL);

	return TRUE;  // return TRUE unless you set the focus to a control
	// EXCEPTION: OCX Property Pages should return FALSE
}
void CMultiSheetDoc::SelectSheetView( int i )
{
	POSITION pos = GetFirstViewPosition();
    while (pos != NULL)
    {
		CView* pView = GetNextView(pos);
		if (pView->IsKindOf( RUNTIME_CLASS( CTinyCadView )))
		{
			static_cast<CTinyCadView*>(pView)->SelectSheet( i );
			pView->RedrawWindow();
		}
    }
}
Example #3
0
void Daten::update_display()
	{
	CWinApp *a;
	CDocTemplate *t;
	CDocument *d;
	CView *v;
	POSITION p;

	a = AfxGetApp();
	p = a->GetFirstDocTemplatePosition();
	t = a->GetNextDocTemplate( p);
	p = t->GetFirstDocPosition();
	d = t->GetNextDoc( p);
	p = d->GetFirstViewPosition();
	v = d->GetNextView( p);
	v->RedrawWindow();
	}