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 <OCC_3dView.h>
|
||||
#include <res\resource.h>
|
||||
|
||||
BEGIN_MESSAGE_MAP(CImportExportApp, OCC_3dApp)
|
||||
BEGIN_MESSAGE_MAP(CImportExportApp, OCC_App)
|
||||
//{{AFX_MSG_MAP(CSerializeApp)
|
||||
ON_COMMAND(ID_FILE_OPEN, OnFileOpen)
|
||||
//}}AFX_MSG_MAP
|
||||
@@ -20,16 +20,19 @@ END_MESSAGE_MAP()
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CImportExportApp construction
|
||||
|
||||
CImportExportApp::CImportExportApp()
|
||||
CImportExportApp::CImportExportApp() : OCC_App()
|
||||
{
|
||||
// Set the local system units
|
||||
try
|
||||
{ UnitsAPI::SetLocalSystem(UnitsAPI_MDTV); }
|
||||
catch (Standard_Failure)
|
||||
{
|
||||
AfxMessageBox("Fatal Error in units initialisation");
|
||||
}
|
||||
SampleName = "ImportExport"; //for about dialog
|
||||
// Set the local system units
|
||||
try
|
||||
{
|
||||
UnitsAPI::SetLocalSystem (UnitsAPI_MDTV);
|
||||
}
|
||||
catch (Standard_Failure)
|
||||
{
|
||||
AfxMessageBox ("Fatal Error in units initialisation");
|
||||
}
|
||||
|
||||
SampleName = "ImportExport"; //for about dialog
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
@@ -111,7 +114,7 @@ void CImportExportApp::OnFileOpen()
|
||||
NULL );
|
||||
|
||||
|
||||
CString initdir(((OCC_BaseApp*) AfxGetApp())->GetInitDataDir());
|
||||
CString initdir(((OCC_App*) AfxGetApp())->GetInitDataDir());
|
||||
initdir += "\\Data";
|
||||
|
||||
dlg.m_ofn.lpstrInitialDir = initdir;
|
||||
|
@@ -8,25 +8,29 @@
|
||||
#pragma once
|
||||
#endif // _MSC_VER >= 1000
|
||||
|
||||
#include <OCC_3dApp.h>
|
||||
#include <OCC_App.h>
|
||||
|
||||
class CImportExportApp : public OCC_3dApp
|
||||
class CImportExportApp : public OCC_App
|
||||
{
|
||||
public:
|
||||
CImportExportApp();
|
||||
|
||||
CImportExportApp();
|
||||
|
||||
// Overrides
|
||||
// ClassWizard generated virtual function overrides
|
||||
//{{AFX_VIRTUAL(CImportExportApp)
|
||||
public:
|
||||
virtual BOOL InitInstance();
|
||||
virtual CDocument* OpenDocumentFile(LPCTSTR lpszFileName);
|
||||
//}}AFX_VIRTUAL
|
||||
// ClassWizard generated virtual function overrides
|
||||
//{{AFX_VIRTUAL(CImportExportApp)
|
||||
public:
|
||||
virtual BOOL InitInstance();
|
||||
virtual CDocument* OpenDocumentFile(LPCTSTR lpszFileName);
|
||||
//}}AFX_VIRTUAL
|
||||
|
||||
protected:
|
||||
//{{AFX_MSG(CSerializeApp)
|
||||
afx_msg void OnFileOpen();
|
||||
//}}AFX_MSG
|
||||
DECLARE_MESSAGE_MAP()
|
||||
|
||||
//{{AFX_MSG(CSerializeApp)
|
||||
afx_msg void OnFileOpen();
|
||||
//}}AFX_MSG
|
||||
|
||||
DECLARE_MESSAGE_MAP()
|
||||
};
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
Reference in New Issue
Block a user