Ejemplo n.º 1
0
BOOL DlgFFT::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	m_ok.SetIcon(IDI_G,BS_LEFT);
	m_canc.SetIcon(IDI_R,BS_LEFT);

	m_cforcefft.SetCheck(1);
	//m_cmagnitude.SetCheck(1);

	m_real.AddString("(None)");
	m_real.SetItemData(m_real.GetCount()-1, 0);
	m_imag.AddString("(None)");
	m_imag.SetItemData(m_imag.GetCount()-1, 0);

	POSITION pos = AfxGetApp()->GetFirstDocTemplatePosition();
	while (pos != NULL) {
		CDocTemplate* pTemplate = AfxGetApp()->GetNextDocTemplate(pos);
		ASSERT(pTemplate->IsKindOf(RUNTIME_CLASS(CDocTemplate)));
		POSITION pos2 = pTemplate->GetFirstDocPosition();
		while (pos2 != NULL) {
			CDemoDoc* pDoc = (CDemoDoc*) pTemplate->GetNextDoc(pos2);
			ASSERT(pDoc->IsKindOf(RUNTIME_CLASS(CDemoDoc)));
			CString title = pDoc->GetTitle();
			m_real.AddString(title);
			m_real.SetItemData(m_real.GetCount()-1, (DWORD)pDoc);
			m_imag.AddString(title);
			m_imag.SetItemData(m_imag.GetCount()-1, (DWORD)pDoc);
		}
	}
	m_real.SetCurSel(0);
	m_imag.SetCurSel(0);

	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
Ejemplo n.º 2
0
BOOL DlgMix::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	m_bitmap=0;
	m_ratio=1.0f;
	m_xoffset=m_yoffset=0;
	pDocSrc = pDocDst = 0;
	OpType=0;
	m_mixalpha = 0;

	m_ok.SetIcon(IDI_G,BS_LEFT);
	m_canc.SetIcon(IDI_R,BS_LEFT);

	POSITION pos = AfxGetApp()->GetFirstDocTemplatePosition();
	while (pos != NULL) {
		CDocTemplate* pTemplate = AfxGetApp()->GetNextDocTemplate(pos);
		ASSERT(pTemplate->IsKindOf(RUNTIME_CLASS(CDocTemplate)));
		POSITION pos2 = pTemplate->GetFirstDocPosition();
		while (pos2 != NULL) {
			CDemoDoc* pDoc = (CDemoDoc*) pTemplate->GetNextDoc(pos2);
			ASSERT(pDoc->IsKindOf(RUNTIME_CLASS(CDemoDoc)));
			CString title = pDoc->GetTitle();
			m_cbSrc.AddString(title);
			m_cbSrc.SetItemData(m_cbSrc.GetCount()-1, (DWORD)pDoc);
			m_cbDst.AddString(title);
			m_cbDst.SetItemData(m_cbDst.GetCount()-1, (DWORD)pDoc);
		}
	}
	m_cbSrc.SetCurSel(0);

	if (m_cbDst.GetCount()>1){
		m_cbDst.SetCurSel(1);
	} else {
		m_cbDst.SetCurSel(0);
	}
	
	m_cbOpType.AddString(_T("OpAvg"));
	m_cbOpType.SetItemData(m_cbOpType.GetCount()-1, (DWORD)CxImage::OpAvg);
	m_cbOpType.AddString(_T("OpAdd"));
	m_cbOpType.SetItemData(m_cbOpType.GetCount()-1, (DWORD)CxImage::OpAdd);
	m_cbOpType.AddString(_T("OpAnd"));
	m_cbOpType.SetItemData(m_cbOpType.GetCount()-1, (DWORD)CxImage::OpAnd);
	m_cbOpType.AddString(_T("OpXor"));
	m_cbOpType.SetItemData(m_cbOpType.GetCount()-1, (DWORD)CxImage::OpXor);
	m_cbOpType.AddString(_T("OpOr"));
	m_cbOpType.SetItemData(m_cbOpType.GetCount()-1, (DWORD)CxImage::OpOr);
	m_cbOpType.AddString(_T("OpScreen"));
	m_cbOpType.SetItemData(m_cbOpType.GetCount()-1, (DWORD)CxImage::OpScreen);
	m_cbOpType.AddString(_T("OpMask"));
	m_cbOpType.SetItemData(m_cbOpType.GetCount()-1, (DWORD)CxImage::OpMask);
	m_cbOpType.AddString(_T("OpSrcCopy"));
	m_cbOpType.SetItemData(m_cbOpType.GetCount()-1, (DWORD)CxImage::OpSrcCopy);
	m_cbOpType.AddString(_T("OpDstCopy"));
	m_cbOpType.SetItemData(m_cbOpType.GetCount()-1, (DWORD)CxImage::OpDstCopy);
	m_cbOpType.AddString(_T("OpSub"));
	m_cbOpType.SetItemData(m_cbOpType.GetCount()-1, (DWORD)CxImage::OpSub);
	m_cbOpType.AddString(_T("OpSrcBlend"));
	m_cbOpType.SetItemData(m_cbOpType.GetCount()-1, (DWORD)CxImage::OpSrcBlend);
	m_cbOpType.SetCurSel(0);


	SetMix();

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