}
}
-void CGeometryView2D::OnSize(UINT /*nType*/, int /*cx*/, int /*cy*/)
+void CGeometryView2D::OnSize(UINT nType, int cx, int cy)
{
+ OCC_2dView::OnSize (nType, cx, cy);
if (!myV2dView.IsNull())
{
myV2dView->MustBeResized(); // added sro
myXmax (0),
myYmax (0),
myCurZoom (0.0),
- myWidth (0),
- myHeight (0),
NbActiveLights (2), // There are 2 default active lights
myHlrModeIsOn (Standard_False),
m_Pen (NULL),
BOOL CViewer3dView::PreCreateWindow(CREATESTRUCT& cs)
{
- // TODO: Modify the Window class or styles here by modifying
- // the CREATESTRUCT cs
-
- return CView::PreCreateWindow(cs);
+ // TODO: Modify the Window class or styles here by modifying
+ // the CREATESTRUCT cs
+ cs.lpszClass = ::AfxRegisterWndClass(CS_HREDRAW | CS_VREDRAW | CS_DBLCLKS | CS_OWNDC, ::LoadCursor(NULL, IDC_ARROW), NULL, NULL);
+ return CView::PreCreateWindow(cs);
}
/////////////////////////////////////////////////////////////////////////////
{
CViewer3dDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
- CRect aRect;
- GetWindowRect(aRect);
- if(myWidth != aRect.Width() || myHeight != aRect.Height()) {
- myWidth = aRect.Width();
- myHeight = aRect.Height();
- ::PostMessage ( GetSafeHwnd () , WM_SIZE , SW_SHOW , myWidth + myHeight*65536 );
- }
myView->Redraw();
-
}
/////////////////////////////////////////////////////////////////////////////
return ResultPoint;
}
-void CViewer3dView::OnSize(UINT /*nType*/, int /*cx*/, int /*cy*/)
+void CViewer3dView::OnSize(UINT nType, int cx, int cy)
{
+ CView::OnSize (nType, cx, cy);
if (!myView.IsNull())
myView->MustBeResized();
}
Standard_Integer myYmin;
Standard_Integer myXmax;
Standard_Integer myYmax;
- Standard_Integer myWidth;
- Standard_Integer myHeight;
Standard_Integer NbActiveLights;
Standard_Boolean myHlrModeIsOn;
BOOL CAnimationView3D::PreCreateWindow(CREATESTRUCT& cs)
{
- // TODO: Modify the Window class or styles here by modifying
- // the CREATESTRUCT cs
-
- return CView::PreCreateWindow(cs);
+ // TODO: Modify the Window class or styles here by modifying
+ // the CREATESTRUCT cs
+ cs.lpszClass = ::AfxRegisterWndClass(CS_HREDRAW | CS_VREDRAW | CS_DBLCLKS | CS_OWNDC, ::LoadCursor(NULL, IDC_ARROW), NULL, NULL);
+ return CView::PreCreateWindow(cs);
}
/////////////////////////////////////////////////////////////////////////////
GetDocument()->ExportView (myView);
}
-void CAnimationView3D::OnSize(UINT /*nType*/, int cx, int cy)
+void CAnimationView3D::OnSize(UINT nType, int cx, int cy)
{
- m_cx = cx ;
- m_cy = cy ;
- if (!myView.IsNull())
- myView->MustBeResized();
+ CView::OnSize (nType, cx, cy);
+ m_cx = cx ;
+ m_cy = cy ;
+ if (!myView.IsNull())
+ myView->MustBeResized();
}
void CAnimationView3D::OnBUTTONBack()
BOOL COCCDemoView::PreCreateWindow(CREATESTRUCT& cs)
{
- // TODO: Modify the Window class or styles here by modifying
- // the CREATESTRUCT cs
-
- return CView::PreCreateWindow(cs);
+ // TODO: Modify the Window class or styles here by modifying
+ // the CREATESTRUCT cs
+ cs.lpszClass = ::AfxRegisterWndClass(CS_HREDRAW | CS_VREDRAW | CS_DBLCLKS | CS_OWNDC, ::LoadCursor(NULL, IDC_ARROW), NULL, NULL);
+ return CView::PreCreateWindow(cs);
}
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// COCCDemoView message handlers
-void COCCDemoView::OnSize(UINT /*nType*/, int /*cx*/, int /*cy*/)
+void COCCDemoView::OnSize(UINT nType, int cx, int cy)
{
+ CView::OnSize (nType, cx, cy);
if (!myView.IsNull())
myView->MustBeResized();
}
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
+ cs.lpszClass = ::AfxRegisterWndClass(CS_HREDRAW | CS_VREDRAW | CS_DBLCLKS | CS_OWNDC, ::LoadCursor(NULL, IDC_ARROW), NULL, NULL);
return CView::PreCreateWindow(cs);
}
}
-void OCC_2dView::OnSize(UINT /*nType*/, int /*cx*/, int /*cy*/)
+void OCC_2dView::OnSize(UINT nType, int cx, int cy)
{
+ OCC_BaseView::OnSize (nType, cx, cy);
// Take care : This fonction is call before OnInitialUpdate
if (!myV2dView.IsNull())
myV2dView->MustBeResized();
-
}
void OCC_2dView::OnBUTTONFitAll()
BOOL OCC_3dView::PreCreateWindow(CREATESTRUCT& cs)
{
- // TODO: Modify the Window class or styles here by modifying
- // the CREATESTRUCT cs
- return CView::PreCreateWindow(cs);
+ // TODO: Modify the Window class or styles here by modifying
+ // the CREATESTRUCT cs
+ cs.lpszClass = ::AfxRegisterWndClass(CS_HREDRAW | CS_VREDRAW | CS_DBLCLKS | CS_OWNDC, ::LoadCursor(NULL, IDC_ARROW), NULL, NULL);
+ return CView::PreCreateWindow(cs);
}
/////////////////////////////////////////////////////////////////////////////
GetDocument()->ExportView (myView);
}
-void OCC_3dView::OnSize(UINT /*nType*/, int /*cx*/, int /*cy*/)
+void OCC_3dView::OnSize(UINT nType, int cx, int cy)
{
+ OCC_BaseView::OnSize (nType, cx, cy);
if (!myView.IsNull())
myView->MustBeResized();
}
asp->SetHorizontalJustification(myHAlign);
asp->SetVerticalJustification(myVAlign);
- asp->Aspect()->SetTextZoomable(myIsZoomable);
+ asp->Aspect()->SetTextZoomable(myIsZoomable == Standard_True);
asp->Aspect()->SetTextAngle(myAngle);
asp->Aspect()->SetTextFontAspect(myFontAspect);
asp->SetHeight(myHeight);