本文整理汇总了C++中COleClientItem::SetItemRects方法的典型用法代码示例。如果您正苦于以下问题:C++ COleClientItem::SetItemRects方法的具体用法?C++ COleClientItem::SetItemRects怎么用?C++ COleClientItem::SetItemRects使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类COleClientItem
的用法示例。
在下文中一共展示了COleClientItem::SetItemRects方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetDocument
void CMy1553View::OnSize(UINT nType, int cx, int cy)
{
CView::OnSize(nType, cx, cy);
COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
if (pActiveItem != NULL)
pActiveItem->SetItemRects();
}
示例2: OnSize
void CGenEdView::OnSize(UINT nType, int cx, int cy)
{
CView::OnSize(nType, cx, cy);
if(m_pDocument)
{
CGenEdDoc* pDoc = GetDocument();
if(pDoc)
{
COleClientItem* pActiveItem = pDoc->GetInPlaceActiveItem(this);
if (pActiveItem != NULL && pActiveItem == m_pServer)
pActiveItem->SetItemRects();
else if (m_pServer != NULL)
{
m_pServer->SetClientExtent (CSize (cx, cy));
}
}
}
}
示例3: OnSize
void ScreenCamView::OnSize( wxSizeEvent &event )
{
// This is called early, so if pDocView is null do nothing
if( NULL == pDocView )
return;
SetCurrentStates();
Document* pCurDoc = Document::GetCurrent();
DocView* pCurView = DocView::GetCurrent();
// these lines are here to stop very strange things happening on exit under Win32s
// when this fn gets called when it really shouldn't. I would like to really know
// just what on earth os going on under Win32s but it iss something strange in message
// handling as far as I can tell.
wxSize size( event.GetSize() );
// Check for irrelevant or potty messages.
if (size.x <= 0 || size.y <= 0)
{
// TRACEUSER( "JustinF", _T("Strange size msg in ScreenView::OnSize(0x%X, %d, %d)\n"),
// nType, cx, cy);
return;
}
// Handle OLE 2.0 in-place activation stuff.
#if (_OLE_VER >= 0x200)
if(GetDocument())
{
COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this);
if (pActiveItem) pActiveItem->SetItemRects();
}
#endif
if (Status->ScrollersVisible)
{
PORTNOTETRACE( "other", "ScreenCamView::OnSize - Removed scroller usage" );
#if !defined(EXCLUDE_FROM_XARALX)
// Resize and reposition the proportional scrollers.
wxRect hrect, vrect;
HScrollBar->CalcPosFromParentClient(&hrect);
UINT32 RulerWidth = OILRuler::GetWidth();
//if rulers are switched on the scroll bars are made
// smaller to accomodate them
if (Status->RulersVisible)
hrect.left += RulerWidth;
if (RULER_BORDERS)
hrect.left-=2;
HScrollBar->MoveWindow(&hrect, TRUE);
VScrollBar->CalcPosFromParentClient(&vrect);
if (Status->RulersVisible)
vrect.top += RulerWidth;
if (RULER_BORDERS)
vrect.top-=2;
VScrollBar->MoveWindow(&vrect, TRUE);
// Reposition the corner window at the bottom-right.
Corner->MoveWindow(vrect.left, hrect.top, vrect.Width(), hrect.Height());
// Resize/reposition the rendering window.
CurrentSize.left = CurrentSize.top = 0;
CurrentSize.right = cx - vrect.Width() + 1;
CurrentSize.bottom = cy - hrect.Height() + 1;
#endif
}
else
{
CurrentSize.x = CurrentSize.y = 0;
CurrentSize.width = size.x;
CurrentSize.height = size.y;
}
if (Status->RulersVisible)
{
PORTNOTETRACE( "other", "ScreenCamView::OnSize - Removed scroller / ruler usage" );
#if !defined(EXCLUDE_FROM_XARALX)
wxRect hRect, vRect, oRect;
HRuler->CalcPosFromParentClient(&hRect);
HRuler->MoveWindow(&hRect, TRUE);
HRuler->PositionLegend();
CurrentSize.top = 0 + hRect.Height() ;
VRuler->CalcPosFromParentClient(&vRect);
VRuler->MoveWindow(&vRect, TRUE);
CurrentSize.left = 0 + vRect.Width();
OGadget->CalcPosFromParentClient(&oRect);
OGadget->MoveWindow(&oRect, TRUE);
if (RULER_BORDERS)
{
CurrentSize.top --;
CurrentSize.left--;
}
//.........这里部分代码省略.........