mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0023776: Redesign of MFC samples after V2d viewer removing
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
#include "AnimationView3D.h"
|
||||
#include "..\..\Common\res\OCC_Resource.h"
|
||||
|
||||
BEGIN_MESSAGE_MAP(CAnimationApp, OCC_3dApp)
|
||||
BEGIN_MESSAGE_MAP(CAnimationApp, OCC_App)
|
||||
//{{AFX_MSG_MAP(CAnimationApp)
|
||||
ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
|
||||
// NOTE - the ClassWizard will add and remove mapping macros here.
|
||||
@@ -23,9 +23,9 @@ END_MESSAGE_MAP()
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CAnimationApp construction
|
||||
|
||||
CAnimationApp::CAnimationApp()
|
||||
CAnimationApp::CAnimationApp() : OCC_App()
|
||||
{
|
||||
SampleName = "Animation"; //for about dialog
|
||||
SampleName = "Animation"; //for about dialog
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
@@ -92,7 +92,7 @@ void CAnimationApp::OnAppAbout()
|
||||
CMDIChildWnd *pChild = (CMDIChildWnd *) pFrame->GetActiveFrame();
|
||||
CAnimationView3D *pView = (CAnimationView3D *) pChild->GetActiveView();
|
||||
pView -> OnStop();
|
||||
OCC_3dApp::OnAppAbout();
|
||||
OCC_App::OnAppAbout();
|
||||
pView -> OnRestart();
|
||||
}
|
||||
|
||||
|
@@ -8,28 +8,28 @@
|
||||
#pragma once
|
||||
#endif // _MSC_VER >= 1000
|
||||
|
||||
#include <OCC_3dApp.h>
|
||||
#include <OCC_App.h>
|
||||
|
||||
class CAnimationApp : public OCC_3dApp
|
||||
class CAnimationApp : public OCC_App
|
||||
{
|
||||
public:
|
||||
CAnimationApp();
|
||||
|
||||
CAnimationApp();
|
||||
|
||||
//{{AFX_MSG(CAnimationApp)
|
||||
afx_msg void OnAppAbout();
|
||||
// NOTE - the ClassWizard will add and remove member functions here.
|
||||
// DO NOT EDIT what you see in these blocks of generated code !
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
afx_msg void OnAppAbout();
|
||||
// NOTE - the ClassWizard will add and remove member functions here.
|
||||
// DO NOT EDIT what you see in these blocks of generated code !
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
// Overrides
|
||||
// ClassWizard generated virtual function overrides
|
||||
//{{AFX_VIRTUAL(CAnimationApp)
|
||||
public:
|
||||
virtual BOOL InitInstance();
|
||||
//}}AFX_VIRTUAL
|
||||
// ClassWizard generated virtual function overrides
|
||||
//{{AFX_VIRTUAL(CAnimationApp)
|
||||
public:
|
||||
virtual BOOL InitInstance();
|
||||
//}}AFX_VIRTUAL
|
||||
};
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//{{AFX_INSERT_LOCATION}}
|
||||
|
@@ -359,7 +359,7 @@ void CAnimationDoc::OnFileLoadgrid()
|
||||
"Points Files (*.pnt;*.pnts)|*.pnt; *.pnts|All Files (*.*)|*.*||",
|
||||
NULL );
|
||||
|
||||
CString initdir(((OCC_BaseApp*) AfxGetApp())->GetInitDataDir());
|
||||
CString initdir(((OCC_App*) AfxGetApp())->GetInitDataDir());
|
||||
initdir += "\\..\\..\\Data\\";
|
||||
|
||||
dlg.m_ofn.lpstrInitialDir = initdir;
|
||||
|
@@ -237,19 +237,24 @@ CAnimationDoc* CAnimationView3D::GetDocument() // non-debug version is inline
|
||||
// CAnimationView3D message handlers
|
||||
void CAnimationView3D::OnFileExportImage()
|
||||
{
|
||||
CFileDialog dlg(FALSE,_T("*.BMP"),NULL,OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
|
||||
_T("BMP Files (*.BMP)|*.bmp |GIF Files (*.GIF)|*.gif | PNG Files (*.PNG)|*.png"
|
||||
"|JPEG Files (*.JPEG)|*.jpeg | PPM Files (*.PPM)|*.ppm | TIFF Files (*.TIFF)"
|
||||
"|*.tiff | TGA Files (*.TGA)|*.tga | EXR Files (*.EXR)|*.exr||"),
|
||||
NULL );
|
||||
|
||||
if (dlg.DoModal() == IDOK)
|
||||
CFileDialog aDlg (FALSE, "*.BMP", NULL, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
|
||||
"BMP Files (*.BMP)|*.bmp|"
|
||||
"GIF Files (*.GIF)|*.gif|"
|
||||
"PNG Files (*.PNG)|*.png|"
|
||||
"JPEG Files (*.JPEG)|*.jpeg|"
|
||||
"PPM Files (*.PPM)|*.ppm|"
|
||||
"TIFF Files (*.TIFF)|*.tiff|"
|
||||
"TGA Files (*.TGA)|*.tga|"
|
||||
"EXR Files (*.EXR)|*.exr||",
|
||||
NULL);
|
||||
if (aDlg.DoModal() != IDOK)
|
||||
{
|
||||
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
|
||||
CString aFileName = dlg.GetPathName();
|
||||
myView->Dump(aFileName);
|
||||
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW));
|
||||
return;
|
||||
}
|
||||
|
||||
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
|
||||
myView->Dump (aDlg.GetPathName());
|
||||
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW));
|
||||
}
|
||||
|
||||
void CAnimationView3D::OnSize(UINT nType, int cx, int cy)
|
||||
|
Reference in New Issue
Block a user