void CMy1553View::OnSize(UINT nType, int cx, int cy) { CView::OnSize(nType, cx, cy); COleClientItem* pActiveItem = GetDocument()->GetInPlaceActiveItem(this); if (pActiveItem != NULL) pActiveItem->SetItemRects(); }
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)); } } } }
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--; } #endif } PORTNOTE( "other", "ScreenCamView::OnSize - Removed RenderWindow usage -not sure if needed" ) #ifndef EXCLUDE_FROM_XARALX RenderWindow->MoveWindow(&CurrentSize, TRUE); #endif // Update the rest of the window placement information. UpdateViewPosition(); // Calculate the work area, page & line sizes etc etc. FIXED16 PixelWidth, PixelHeight; pDocView->GetPixelSize(&PixelWidth, &PixelHeight); PORTNOTE( "other", "ScreenCamView::OnSize - Removed scroller usage" ) #if !defined(EXCLUDE_FROM_XARALX) XLONG x1 = CurrentSize.GetWidth() * PixelWidth; XLONG x2 = CurrentSize.GetHeight() * PixelHeight; HScrollBar->SetPageSize(x1); VScrollBar->SetPageSize(x2); HScrollBar->SetLineSize(x1 / xlong(10) + xlong(1)); VScrollBar->SetLineSize(x2 / xlong(10) + xlong(1)); #endif SetWorkAreaExtent(Status->WorkAreaExtent, FALSE); // Make sure the scroll offsets are valid - if we resize the bottom of the window // when at the extreme bottom of the view, then the scroll offsets should be // changed - we use the scrollers' own integrity checks to do this automatically. // Don't do this until the setup flag is TRUE, so we don't overwrite scroll offsets // that have been reloaded. if (fSetupDone) { WorkCoord CurrScrollPos; GetScrollOffset(&CurrScrollPos); SetScrollOffset(CurrScrollPos, TRUE); } // Inform the associated DocView object that something has happened. pDocView->ViewStateChanged(); pCurDoc->SetCurrent(); pCurView->SetCurrent(); }