本文整理汇总了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;
}
示例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
}
示例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
}