本文整理汇总了C++中CComQIPtr::GetImagePos方法的典型用法代码示例。如果您正苦于以下问题:C++ CComQIPtr::GetImagePos方法的具体用法?C++ CComQIPtr::GetImagePos怎么用?C++ CComQIPtr::GetImagePos使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CComQIPtr
的用法示例。
在下文中一共展示了CComQIPtr::GetImagePos方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getVertexAt
VertexAt CRender::getVertexAt(const GraphTypes::PointF &p, const CUniqueID & overNode)
{
CComPtr<boost::scoped_lock_ref_counted> lock;
VertexAt retVal(CUniqueID(), HITTEST_UNKNOWN);
CComPtr<IGraphItem> item;
CComPtr<IUnknown> unk;
CComPtr<IRenderer> ir;
CComQIPtr<ILegacyRenderer> lv;
RectF rc;
IGraphItemVector results;
m_graph->GetChildren(results);
for(IGraphItemVector::iterator itr=results.begin(); itr!=results.end(); ++itr)
{
item=*itr;
CUniqueID id = item->GetID();
unk=item->GetPropertyUnknown(0);
if(unk!=0)
{
lv=unk.p;
if(lv!=0)
{
lv->GetTitlePos(rc);
if (rc.Contains(p))
{
retVal = VertexAt(id, HITTEST_LABEL);
}
else
{
lv->GetImagePos(rc);
if (rc.Contains(p))
{
retVal = VertexAt(id, HITTEST_ICON);
}
else
{
lv->GetImagePos(rc);
if(rc.Contains(p))
{
retVal = VertexAt(id, HITTEST_IMAGE);
}
}
}
}
else
{
ir=static_cast<IRenderer*>(unk.p);
if(ir!=0)
{
ir->GetBoundsBox(rc);
if (rc.Contains(p))
retVal = VertexAt(id, HITTEST_BBOX);
}
}
}
}
return retVal;
}
示例2: getGraphExtent
RectF CRender::getGraphExtent(bool selectedOnly) const
{
RectF retVal;
bool first = true;
CComPtr<boost::scoped_lock_ref_counted> lock;
CComPtr<IGraphItem> item;
CComPtr<IUnknown> unk;
CComQIPtr<IListWindowRenderer> lw;
CComQIPtr<ILegacyRenderer> lv;
RectF rc;
IGraphItemVector results;
m_graph->GetChildren(results);
for(IGraphItemVector::iterator itr=results.begin(); itr!=results.end(); ++itr)
{
item=*itr;
CUniqueID id = item->GetID();
unk=item->GetPropertyUnknown(0);
if(unk!=0)
{
lv=unk.p;
if(lv!=0)
{
if (selectedOnly && !lv->IsSelected())
{
continue;
}
if (first)
{
lv->GetTitlePos(retVal);
first = false;
}
else
{
lv->GetTitlePos(rc);
retVal.Union(retVal, retVal, rc);
}
lv->GetIconPos(rc);
retVal.Union(retVal, retVal, rc);
lv->GetImagePos(rc);
retVal.Union(retVal, retVal, rc);
}
else
{
lw=unk.p;
if(lw!=0)
{
if (selectedOnly && !lw->IsSelected())
{
continue;
}
if (first)
{
lw->GetBoundsBox(retVal);
first = false;
}
else
{
lw->GetBoundsBox(rc);
retVal.Union(retVal, retVal, rc);
}
}
}
}
}
return retVal;
}