mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-29 14:00:49 +03:00
0024943: Port MFC samples to UNICODE for compatibility with VS2013
Add vc12 project files for MFC samples. CMake - add Unicode option for MFC samples CMake - do not set MFC option globally Update description of Cmake building procedure for MFC sample Correction of cmake.md and automake.md 0024943: Port MFC sample to UNICODE for compatibility with VS2013 The formatting of developer guides about OCCT building with various build systems has been improved. automake article clean up
This commit is contained in:
@@ -85,7 +85,7 @@ void CColoredShapes::Serialize(CArchive & ar)
|
||||
// Check
|
||||
if (d->ErrorStatus() != Storage_VSOk)
|
||||
{
|
||||
::MessageBox(NULL, " Error while writing... ", " Error ",MB_OK) ;
|
||||
::MessageBoxW (AfxGetApp()->m_pMainWnd->m_hWnd, L"Error while writing... ", L" Error ", MB_OK);
|
||||
}
|
||||
|
||||
// Store the color in the archive
|
||||
|
@@ -68,7 +68,7 @@ Storage_Error FSD_Archive::IsGoodFileType(const TCollection_AsciiString&
|
||||
return s;
|
||||
}
|
||||
|
||||
Storage_Error FSD_Archive::Open(const TCollection_AsciiString& aName,
|
||||
Storage_Error FSD_Archive::Open(const TCollection_AsciiString& theName,
|
||||
const Storage_OpenMode
|
||||
#ifdef WNT
|
||||
aMode
|
||||
@@ -76,20 +76,20 @@ Storage_Error FSD_Archive::Open(const TCollection_AsciiString& aName,
|
||||
)
|
||||
{
|
||||
Storage_Error result = Storage_VSOk;
|
||||
|
||||
SetName(aName);
|
||||
CString aName = theName.ToCString();
|
||||
SetName (theName);
|
||||
#ifdef WNT
|
||||
if (OpenMode() == Storage_VSNone) {
|
||||
if (aMode == Storage_VSRead) {
|
||||
if (!((FSD_CFile*)myCFile)->Open(aName.ToCString(),CFile::modeRead))
|
||||
if (!((FSD_CFile*)myCFile)->Open(aName, CFile::modeRead))
|
||||
result = Storage_VSOpenError;
|
||||
}
|
||||
else if (aMode == Storage_VSWrite) {
|
||||
if (!((FSD_CFile*)myCFile)->Open(aName.ToCString(),CFile::modeCreate | CFile::modeWrite))
|
||||
if (!((FSD_CFile*)myCFile)->Open(aName, CFile::modeCreate | CFile::modeWrite))
|
||||
result = Storage_VSOpenError;
|
||||
}
|
||||
else if (aMode == Storage_VSReadWrite) {
|
||||
if (!((FSD_CFile*)myCFile)->Open(aName.ToCString(),CFile::modeReadWrite))
|
||||
if (!((FSD_CFile*)myCFile)->Open(aName, CFile::modeReadWrite))
|
||||
result = Storage_VSOpenError;
|
||||
}
|
||||
if (result == Storage_VSOk) {
|
||||
|
@@ -29,11 +29,11 @@ CImportExportApp::CImportExportApp() : OCC_App()
|
||||
}
|
||||
catch (Standard_Failure)
|
||||
{
|
||||
AfxMessageBox ("Fatal Error in units initialisation");
|
||||
AfxMessageBox (L"Fatal Error in units initialisation");
|
||||
}
|
||||
|
||||
SampleName = "ImportExport"; //for about dialog
|
||||
SetSamplePath ("..\\..\\05_ImportExport");
|
||||
SetSamplePath (L"..\\..\\05_ImportExport");
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
@@ -98,7 +98,7 @@ CDocument* CImportExportApp::OpenDocumentFile(LPCTSTR lpszFileName)
|
||||
CFile cf;
|
||||
|
||||
if (!cf.Open(lpszFileName,CFile::modeReadWrite)){
|
||||
AfxMessageBox("File not found!");
|
||||
AfxMessageBox (L"File not found!");
|
||||
return NULL;
|
||||
}
|
||||
cf.Close();
|
||||
|
Reference in New Issue
Block a user