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


C++ CComboBox::GetItemDataPtr方法代码示例

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


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

示例1: UpdateData

void CAntiVirus::UpdateData(CComboBox& wndAntiVirus)
{
	if ( ! ::IsWindow( wndAntiVirus.GetSafeHwnd() ) )
		return;

	if ( wndAntiVirus.IsWindowEnabled() )
	{
		Settings.General.AntiVirus = *(CString*)wndAntiVirus.GetItemDataPtr( wndAntiVirus.GetCurSel() );
	}
}
开发者ID:ivan386,项目名称:Shareaza,代码行数:10,代码来源:AntiVirus.cpp

示例2: Free

void CAntiVirus::Free(CComboBox& wndAntiVirus)
{
	if ( ! ::IsWindow( wndAntiVirus.GetSafeHwnd() ) )
		return;

	const int nCount = wndAntiVirus.GetCount();
	for ( int i = 0; i < nCount; ++i )
	{
		delete (CString*)wndAntiVirus.GetItemDataPtr( i );
	}
}
开发者ID:ivan386,项目名称:Shareaza,代码行数:11,代码来源:AntiVirus.cpp

示例3: OnBnClickedBtConvert

//-----  OnBnClickedBtConvert()  ----------------------------------------------
void CFormChunkMergeView::OnBnClickedBtConvert()
{
	Configuration*			pConfig  (Configuration::getInstance());
	CComboBox*				pCBox    ((CComboBox*) GetDlgItem(IDC_CB_MAT_SINGLE));
	NifCollisionUtility		ncUtility(*(NifUtlMaterialList::getInstance()));
	map<int, unsigned int>	materialMap;
	unsigned short			ncReturn (NCU_OK);

	//  store data
	UpdateData(TRUE);

	//  build full texture path and set to utility
	ncUtility.setSkyrimPath(pConfig->getPathTextures());

	//  set callback for log info
	ncUtility.setLogCallback(logCallback);

	//  get material handling
	MaterialTypeHandling	matHandling((MaterialTypeHandling) (GetCheckedRadioButton(IDC_RD_MAT_SINGLE, IDC_RD_MAT_DEFINE) - IDC_RD_MAT_SINGLE));

	//  set default material
	materialMap[-1] = ((unsigned int) pCBox->GetItemDataPtr(pCBox->GetCurSel()));

	//  add additional materials in case of special handling
	if (matHandling == NCU_MT_MATMAP)
	{
		//  do something special
	}

	//  set flags
	ncUtility.setCollisionNodeHandling((CollisionNodeHandling) (GetCheckedRadioButton(IDC_RD_COLL_CDATA, IDC_RD_COLL_MESH) - IDC_RD_COLL_CDATA));
	ncUtility.setMaterialTypeHandling (matHandling, materialMap);
	ncUtility.setDefaultMaterial      (materialMap[-1]);
	ncUtility.setMergeCollision       (((CButton*) GetDlgItem(IDC_RD_COLL_GLOBAL)) ->GetCheck() == TRUE);
	ncUtility.setReorderTriangles     (((CButton*) GetDlgItem(IDC_CK_REORDER_TRIS))->GetCheck() == TRUE);

	//  add collision data to nif
	ncReturn = ncUtility.addCollision(CStringA(_fileNameColl).GetString(), CStringA(_fileNameIn).GetString(), pConfig->getPathTemplates() + "\\" + CStringA(_template).GetString());

	//  decode result
	if (ncReturn == NCU_OK)
	{
		LogMessageObject::LogMessage(NCU_MSG_TYPE_SUCCESS, "Collision data added successfully");
	}
	else
	{
		LogMessageObject::LogMessage(NCU_MSG_TYPE_ERROR, "NifCollision returned code: %d", ncReturn);
	}
	LogMessageObject::LogMessage(NCU_MSG_TYPE_INFO, "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -");
}
开发者ID:skyfox69,项目名称:NifUtilsSuite,代码行数:51,代码来源:FormChunkMergeView.cpp

示例4: OnSelendokCbParentmodel

// change parent of model instance
void CDlgClient::OnSelendokCbParentmodel() 
{
  CComboBox *cbParentModel = ((CComboBox*)GetDlgItem(IDC_CB_PARENTMODEL));

  wchar_t strParentName[256];
  INDEX iCurSelected = cbParentModel->GetCurSel();
  // no selection
  if(iCurSelected < 0)
    return;
  // get curent selected in combo box
  cbParentModel->GetLBText(iCurSelected,&strParentName[0]);
  // curent selected in combo box has pointer of model instance that is selected
  CModelInstance *pmiNewParent = (CModelInstance*)cbParentModel->GetItemDataPtr(iCurSelected);
  // get curent parent of this model instance
  CModelInstance *pmiOldParent = pmiSelected->GetParent(theApp.GetDocument()->m_ModelInstance);
  // if no parent
  if(pmiOldParent == NULL)
  {
    theApp.ErrorMessage("Can't move root object!");
    return;
  }
  // old parent is same as new parent
  if(pmiNewParent == pmiOldParent)
  {
    theApp.ErrorMessage("New parent is same as old one");
    return;
  }
  // new parent is same as selected model instance
  if(pmiNewParent == pmiSelected)
  {
    theApp.ErrorMessage("Can't attach object to himself!");
    return;
  }

  // check if pmiNewParent if child of pmiSelected
  if(pmiNewParent->GetParent(pmiSelected) != NULL)
  {
    theApp.ErrorMessage("Can't attach object to his child!");
    return;
  }
  CSkeleton *psklParent = pmiNewParent->mi_psklSkeleton;
  SkeletonLOD *psklodParent = NULL;
  INDEX iParentBoneID = 0;
  if(psklParent != NULL)
  {
    // if parent has skeleton lods
    INDEX ctslod = psklParent->skl_aSkeletonLODs.Count();
    if(ctslod > 0)
    {
      psklodParent = &psklParent->skl_aSkeletonLODs[0];
      INDEX ctsb = psklodParent->slod_aBones.Count();
      // if parent has any bones
      if(ctsb > 0)
      {
        SkeletonBone &sb = psklodParent->slod_aBones[0];
        iParentBoneID = sb.sb_iID;
      }
    }
  }
  // change parent of model instance (pmiSelected)
  pmiSelected->ChangeParent(pmiOldParent,pmiNewParent);
  pmiSelected->mi_iParentBoneID = iParentBoneID;
  // if pmiSelected wasn't added as include of parent
  if(pmiSelected->mi_fnSourceFile == pmiOldParent->mi_fnSourceFile)
  {
    pmiSelected->mi_fnSourceFile = pmiNewParent->mi_fnSourceFile;
  }
  // update model instance
  theApp.UpdateRootModelInstance();
  CSeriousSkaStudioDoc *pDoc = theApp.GetDocument();
  pDoc->MarkAsChanged();
}
开发者ID:AdamFlores,项目名称:Serious-Engine,代码行数:73,代码来源:DlgClient.cpp


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