本文整理汇总了C++中CAnimation::DuplicateAllTheImages方法的典型用法代码示例。如果您正苦于以下问题:C++ CAnimation::DuplicateAllTheImages方法的具体用法?C++ CAnimation::DuplicateAllTheImages怎么用?C++ CAnimation::DuplicateAllTheImages使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CAnimation
的用法示例。
在下文中一共展示了CAnimation::DuplicateAllTheImages方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnEndDrag
LRESULT AnimatorBar::OnEndDrag(WPARAM wParam, LPARAM lParam)
{
XHTMLTREEMSGDATA *pMsg = (XHTMLTREEMSGDATA *) wParam;
ASSERT(pMsg);
XHTMLTREEDRAGMSGDATA *pData = (XHTMLTREEDRAGMSGDATA *) lParam;
LRESULT lResult = 0;
bool isCopying = (GetKeyState(VK_CONTROL) >> 4);
if (pMsg)
{
if (pData)
{
// Get the animation to be dropped
CAnimation* pAnimation = (CAnimation*)animations.GetItemData(pData->hItem);
CAnimation New = *pAnimation;
// Now find a parent
HTREEITEM Parent = pData->hNewParent;
CAnimation* pParent = m_pAnimation;
if(!Parent)
pParent = m_pAnimation;//return 1;
else if (Parent != TVI_ROOT)
pParent = (CAnimation*)animations.GetItemData(Parent);
// Find it and remove it from wherever it is
if(isCopying)
{
New.DuplicateAllTheImages();
New.m_FixedID = application->m_AnimationFixID++;
}
else
application->resources.DeleteAnimationFromNumber(pAnimation->m_FixedID);
// Now find where under this parent we need to insert
if (pData->hAfter == TVI_FIRST)
pParent->m_SubAnimations.push_front(New);
else if (pData->hAfter == TVI_LAST)
pParent->m_SubAnimations.push_back(New);
else
{
// Custom location somewhere
CAnimation* pAfter = (CAnimation*)animations.GetItemData(pData->hAfter);
if (find(pParent->m_SubAnimations.begin(), pParent->m_SubAnimations.end(), *pAfter) != pParent->m_SubAnimations.end())
pParent->m_SubAnimations.insert(++find(pParent->m_SubAnimations.begin(), pParent->m_SubAnimations.end(), *pAfter), New);
else
pParent->m_SubAnimations.push_back(New);
}
if (Parent != TVI_ROOT)
animations.Expand(Parent, TVE_EXPAND);
AnimationHasChanged();
if(isCopying)
{
UpdateAnimations(NULL, NULL, NULL, -2);
lResult = 1;
}
}
}
return lResult; // return 0 to allow drop
}