本文整理汇总了C++中CComQIPtr::GetKeyTimeSelected方法的典型用法代码示例。如果您正苦于以下问题:C++ CComQIPtr::GetKeyTimeSelected方法的具体用法?C++ CComQIPtr::GetKeyTimeSelected怎么用?C++ CComQIPtr::GetKeyTimeSelected使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CComQIPtr
的用法示例。
在下文中一共展示了CComQIPtr::GetKeyTimeSelected方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetPathNodeValue
// virtual
HRESULT CXMLKeyFrameValuesDlg::SetPathNodeValue(BSTR path, BSTR value)
{
//CComPtr<IESelectedAnimationElement> selectedElement;
long ncount;
m_viewGroup->GetSelectedCount(&ncount);
for (int i = 0; i < ncount; i++)
{
CComPtr<IESelectedElement> selectedElement;
m_viewGroup->GetSelectedElementN(i, &selectedElement);
CComPtr<IEElement> eElement;
selectedElement->get_eElement(&eElement);
CComPtr<ILDOMElement> domElement;
eElement->get_domElement(&domElement);
// ::SetPathNodeValue(domElement, path, value);
CComQIPtr<IESelectedAnimationElement> selectedAnimationElement = selectedElement;
//if (wcscmp(attributeName,
if (selectedAnimationElement)//TRUE) // TODO
{
//CComQIPtr<ILSMILAnimationTarget> animationTarget = animationTarget;
CComQIPtr<ILAnimateXXX> animateXXX = domElement;
long ncount;
selectedAnimationElement->GetSelectedKeyTimesCount(&ncount);
for (int i = 0; i < ncount; i++)
{
long keyFrame;
selectedAnimationElement->GetKeyTimeSelected(i, &keyFrame);
CComPtr<ILSMILAttributeValue> attributeValue;
animateXXX->GetValue(keyFrame, &attributeValue);
attributeValue->setStringValue(value);
}
}
}
return S_OK;
}
示例2: GetPathNodeValue
HRESULT CXMLKeyFrameValuesDlg::GetPathNodeValue(BSTR path, BSTR* pVal)
{
#if 0
CComPtr<IESelectedAnimationElement> selectedElement;
long ncount;
selectedElement->GetSelectedKeyTimesCount(&ncount);
CComBSTR value;
for (int i = 0; i < ncount; i++)
{
long keyFrame;
selectedElement->GetKeyTimeSelected(i, &keyFrame);
ILSMILAnimationTarget* animationTarget;
CComPtr<ILAnimateXXXElement> animateXXX;
//CComPtr<ILSMILXMLAttr> attr;
//animationTarget->animatableXMLAttrItemByName(L"", &attribute);
CComPtr<ILSMILAttributeValue> attributeValue;
animateXXX->GetValue(keyFrame, &attributeValue);
CComBSTR value2;
attributeValue->getStringValue(&value2);
if (i == 0)
{
value = value2;
}
else if (wcscmp(value, value2))
{
value.Empty();
break;
}
}
#endif
long ncount;
m_viewGroup->GetSelectedCount(&ncount);
for (int i = 0; i < ncount; i++)
{
CComPtr<IESelectedElement> selectedElement;
m_viewGroup->GetSelectedElementN(i, &selectedElement);
CComPtr<IEElement> eElement;
selectedElement->get_eElement(&eElement);
CComPtr<ILDOMElement> domElement;
eElement->get_domElement(&domElement);
CComBSTR attributeName;
domElement->getAttribute(L"attributeName", &attributeName);
CComQIPtr<IESelectedAnimationElement> selectedAnimationElement = selectedElement;
//if (wcscmp(attributeName,
if (selectedAnimationElement)//TRUE) // TODO
{
//CComQIPtr<ILSMILAnimationTarget> animationTarget = animationTarget;
CComQIPtr<ILAnimateXXX> animateXXX = domElement;
long ncount;
selectedAnimationElement->GetSelectedKeyTimesCount(&ncount);
CComBSTR value;
for (int i = 0; i < ncount; i++)
{
long keyFrame;
selectedAnimationElement->GetKeyTimeSelected(i, &keyFrame);
//CComPtr<ILSMILXMLAttr> attr;
//animationTarget->animatableXMLAttrItemByName(L"", &attribute);
CComPtr<ILSMILAttributeValue> attributeValue;
animateXXX->GetValue(keyFrame, &attributeValue);
CComBSTR value2;
if (attributeValue)
attributeValue->getStringValue(&value2);
if (i == 0)
{
value = value2;
}
else if (cmpbstr(value, value2))
{
value.Empty();
break;
}
}
*pVal = value.Detach();
return S_OK;
}
//.........这里部分代码省略.........