当前位置: 首页>>代码示例>>C++>>正文


C++ CDocTemplate::IsKindOf方法代码示例

本文整理汇总了C++中CDocTemplate::IsKindOf方法的典型用法代码示例。如果您正苦于以下问题:C++ CDocTemplate::IsKindOf方法的具体用法?C++ CDocTemplate::IsKindOf怎么用?C++ CDocTemplate::IsKindOf使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CDocTemplate的用法示例。


在下文中一共展示了CDocTemplate::IsKindOf方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1:

PyObject *CProtectedWinApp::MakePyDocTemplateList()
{
	PyObject *retList = PyList_New(0);
	if (retList==NULL)
		return NULL;
	POSITION posTempl = m_pDocManager ? m_pDocManager->GetFirstDocTemplatePosition() : NULL;
	while (posTempl) {
		CDocTemplate* pTemplate = m_pDocManager->GetNextDocTemplate(posTempl);
		ASSERT(pTemplate->IsKindOf(RUNTIME_CLASS(CDocTemplate)));
		PyObject *newListItem = ui_assoc_object::make(PyCDocTemplate::type, pTemplate)->GetGoodRet();
		if (newListItem==NULL) {
			Py_DECREF(retList);
			return NULL;
		}
		PyList_Append(retList, newListItem);
		Py_DECREF(newListItem);
	}
	return retList;
}
开发者ID:DavidGuben,项目名称:rcbplayspokemon,代码行数:19,代码来源:win32app.cpp

示例2: OnInitDialog

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
}
开发者ID:axDev-toolchain,项目名称:benchmark,代码行数:36,代码来源:DlgFFT.cpp

示例3: OnInitDialog

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
}
开发者ID:Aliceljm1,项目名称:CxImageVS2010,代码行数:67,代码来源:DlgMix.cpp


注:本文中的CDocTemplate::IsKindOf方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。