gp_Mat I = System.MatrixOfInertia();\n\
\n");
PocessTextInDialog("Linear Properties", Message);
- MessageBoxW (AfxGetApp()->m_pMainWnd->m_hWnd, (const wchar_t* )string.ToExtString(), L"Linear Properties", MB_OK);
+ MessageBoxW (AfxGetApp()->m_pMainWnd->m_hWnd, string.ToWideString(), L"Linear Properties", MB_OK);
}
void CModelingDoc::OnSurface()
gp_Mat I = System.MatrixOfInertia();\n\
\n");
PocessTextInDialog("Surface Properties", Message);
- MessageBoxW (AfxGetApp()->m_pMainWnd->m_hWnd, (const wchar_t* )string.ToExtString(), L"Surface Properties", MB_OK);
+ MessageBoxW (AfxGetApp()->m_pMainWnd->m_hWnd, string.ToWideString(), L"Surface Properties", MB_OK);
}
gp_Mat I = System.MatrixOfInertia();\n\
\n");
PocessTextInDialog("Volume Properties", Message);
- MessageBoxW (AfxGetApp()->m_pMainWnd->m_hWnd, (const wchar_t* )string.ToExtString(), L"Volume Properties", MB_OK);
+ MessageBoxW (AfxGetApp()->m_pMainWnd->m_hWnd, string.ToWideString(), L"Volume Properties", MB_OK);
}
NULL,
NULL,
OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
- SupportedImageFormats() + "| all files (*.*)|*.*;||",
+ SupportedImageFormats() + L"| all files (*.*)|*.*;||",
NULL);
CString anInitDir (((OCC_App*) AfxGetApp())->GetInitDataDir());
{
SetCursor(AfxGetApp()->LoadStandardCursor (IDC_WAIT));
CString aFilePath = anOpenImageDlg.GetPathName();
- TCollection_ExtendedString aFileNameW ((Standard_ExtString )(const wchar_t* )aFilePath);
- TCollection_AsciiString aFileName (aFileNameW, '?');
+ TCollection_AsciiString aFileName ((const wchar_t* )aFilePath);
//erase viewer
if(myAISContext->HasOpenedContext())
NULL,
NULL,
OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
- SupportedImageFormats() + "| all files (*.*)|*.*;||",
+ SupportedImageFormats() + L"| all files (*.*)|*.*;||",
NULL);
CString anInitDir (((OCC_App*) AfxGetApp())->GetInitDataDir());
{
SetCursor(AfxGetApp()->LoadStandardCursor (IDC_WAIT));
CString aFilePath = anOpenImageDlg.GetPathName();
- TCollection_ExtendedString aFileNameW ((Standard_ExtString )(const wchar_t* )aFilePath);
- TCollection_AsciiString aFileName (aFileNameW, '?');
+ TCollection_AsciiString aFileName ((const wchar_t* )aFilePath);
//erase viewer
if(myAISContext->HasOpenedContext())
initfile += aTFileName.ToCString();
}
- TCollection_ExtendedString aFileName ((Standard_ExtString )(const wchar_t* )initfile);
- aTShape->SetTextureFileName (TCollection_AsciiString (aFileName, '?'));
+ aTShape->SetTextureFileName (TCollection_AsciiString ((const wchar_t* )initfile));
// do other initialization of AIS_TexturedShape
aTShape->SetTextureMapOn();
// add to filter
strFilter += strFilterName;
ASSERT(!strFilter.IsEmpty()); // must have a file type name
- strFilter += (TCHAR)'\0'; // next string please
- strFilter += (TCHAR)'*';
+ strFilter += L'\0'; // next string please
+ strFilter += L'*';
strFilter += strFilterExt;
- strFilter += (TCHAR)'\0'; // next string please
+ strFilter += L'\0'; // next string please
dlg.m_ofn.nMaxCustFilter++;
}
// append the "*.*" all files filter
CString allFilter;
VERIFY(allFilter.LoadString(AFX_IDS_ALLFILTER));
strFilter += allFilter;
- strFilter += (TCHAR)'\0'; // next string please
- strFilter += _T("*.*");
- strFilter += (TCHAR)'\0'; // last string
+ strFilter += L'\0'; // next string please
+ strFilter += L"*.*";
+ strFilter += L'\0'; // last string
dlg.m_ofn.nMaxCustFilter++;
dlg.m_ofn.lpstrFilter = strFilter;
// Create a new box using the CNewBoxDlg Dialog parameters as attributes
TDF_Label L = TSC.CreateBox (Dlg.m_x, Dlg.m_y, Dlg.m_z, Dlg.m_w, Dlg.m_l, Dlg.m_h,
- TCollection_ExtendedString ((Standard_ExtString )(const wchar_t* )Dlg.m_Name));
+ TCollection_ExtendedString ((const wchar_t* )Dlg.m_Name));
// Get the TPrsStd_AISPresentation of the new box TNaming_NamedShape
Handle(TPrsStd_AISPresentation) prs= TPrsStd_AISPresentation::Set(L, TNaming_NamedShape::GetID());
// Create a new box using the CNewCylDlg Dialog parameters as attributes
TDF_Label L = TSC.CreateCyl (Dlg.m_x, Dlg.m_y, Dlg.m_z, Dlg.m_r, Dlg.m_h,
- TCollection_ExtendedString ((Standard_ExtString )(const wchar_t* )Dlg.m_Name));
+ TCollection_ExtendedString ((const wchar_t* )Dlg.m_Name));
// Get the TPrsStd_AISPresentation of the new cylinder TNaming_NamedShape
Handle(TPrsStd_AISPresentation) prs= TPrsStd_AISPresentation::Set(L, TNaming_NamedShape::GetID());
// Modify the box
TOcaf_Commands TSC(LabObject);
TSC.ModifyBox (Dlg.m_x, Dlg.m_y, Dlg.m_z, Dlg.m_w, Dlg.m_l, Dlg.m_h,
- TCollection_ExtendedString ((Standard_ExtString )(const wchar_t* )Dlg.m_Name), log);
+ TCollection_ExtendedString ((const wchar_t* )Dlg.m_Name), log);
// Get the presentation of the box, display it and set it selected
Handle(TPrsStd_AISPresentation) prs= TPrsStd_AISPresentation::Set(LabObject, TNaming_NamedShape::GetID());
// Modify the cylinder
TOcaf_Commands TSC(LabObject);
TSC.ModifyCyl (Dlg.m_x, Dlg.m_y, Dlg.m_z, Dlg.m_r, Dlg.m_h,
- TCollection_ExtendedString ((Standard_ExtString )(const wchar_t* )Dlg.m_Name), log);
+ TCollection_ExtendedString ((const wchar_t* )Dlg.m_Name), log);
// Get the presentation of the cylinder, display it and set it selected
Handle(TPrsStd_AISPresentation) prs= TPrsStd_AISPresentation::Set(LabObject, TNaming_NamedShape::GetID());
// Modify the cylinder
TOcaf_Commands ToolTSC(ToolLab);
ToolTSC.ModifyCyl (Dlg.m_x, Dlg.m_y, Dlg.m_z, Dlg.m_r, Dlg.m_h,
- TCollection_ExtendedString ((Standard_ExtString )(const wchar_t* )Dlg.m_Name), log);
+ TCollection_ExtendedString ((const wchar_t* )Dlg.m_Name), log);
// Redisplay the modified Tool object
TDataStd_Integer::Set(ToolLab, 1);
void COcafDoc::OnFileSaveAs()
{
const wchar_t* SPathName = PathName;
- TCollection_ExtendedString TPathName ((Standard_ExtString )SPathName);
+ TCollection_ExtendedString TPathName (SPathName);
CString Filter;
cout << "Save As " << CSPath << endl;
PathName=CSPath;
const wchar_t* SPath = CSPath;
- TCollection_ExtendedString TPath ((Standard_ExtString )SPath);
+ TCollection_ExtendedString TPath (SPath);
if (TPath.SearchFromEnd(".xml") > 0)
{
if(PathName!="")
{
const wchar_t* SPath = PathName;
- TCollection_ExtendedString TPath ((Standard_ExtString )SPath);
+ TCollection_ExtendedString TPath (SPath);
if (TPath.SearchFromEnd(".xml") > 0)
{
CString CSPath = dlg.GetPathName();
const wchar_t* SPath = CSPath;
- TCollection_ExtendedString TPath ((Standard_ExtString )SPath);
+ TCollection_ExtendedString TPath (SPath);
// Choose storage format
if (TPath.SearchFromEnd(".xml") > 0)
PathName = lpszPathName;
const wchar_t* aPathName = lpszPathName;
- TCollection_ExtendedString anOccPathName ((Standard_ExtString)aPathName);
+ TCollection_ExtendedString anOccPathName (aPathName);
// Open the document in the current application
//PCDM_ReaderStatus RS = m_App->Open(TPath,myOcafDoc);
return TCollection_AsciiString();
CString aStr;
GetDlgItem (IDC_DisplayUnits)->GetWindowText (aStr);
- TCollection_ExtendedString aCharsW ((Standard_ExtString )(const wchar_t* )aStr);
- return TCollection_AsciiString (aCharsW, '?');
+ return TCollection_AsciiString ((const wchar_t* )aStr);
}
//=======================================================================
if (dlg.DoModal() == IDOK)
{
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
- TCollection_ExtendedString aFileNameW ((Standard_ExtString )(const wchar_t* )dlg.GetPathName());
- TCollection_AsciiString aFileName (aFileNameW, '?');
+ TCollection_AsciiString aFileName ((const wchar_t* )dlg.GetPathName());
Standard_Integer status = ReadIGES (aFileName.ToCString(), aSequence);
if (status != IFSelect_RetDone)
{
{
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
- TCollection_ExtendedString aFileNameW ((Standard_ExtString )(const wchar_t* )dlg.GetPathName());
- TCollection_AsciiString aFileName (aFileNameW, '?');
+ TCollection_AsciiString aFileName ((const wchar_t* )dlg.GetPathName());
result = SaveIGES (aFileName.ToCString(), aHSequenceOfShape);
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW));
if (dlg.DoModal() == IDOK)
{
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
- TCollection_ExtendedString aFileNameW ((Standard_ExtString )(const wchar_t* )dlg.GetPathName());
- TCollection_AsciiString aFileName (aFileNameW, '?');
+ TCollection_AsciiString aFileName ((const wchar_t* )dlg.GetPathName());
IFSelect_ReturnStatus ReturnStatus = ReadSTEP (aFileName.ToCString(), aSequence);
switch (ReturnStatus)
{
if (aDlg.DoModal() == IDOK) {
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
- TCollection_ExtendedString aFileNameW ((Standard_ExtString )(const wchar_t* )aDlg.GetPathName());
- TCollection_AsciiString aFileName (aFileNameW, '?');
+ TCollection_AsciiString aFileName ((const wchar_t* )aDlg.GetPathName());
STEPControl_StepModelType selection = aDlg.m_Cc1ModelType;
if (dlg.DoModal() == IDOK) {
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
- TCollection_ExtendedString aFileNameW ((Standard_ExtString )(const wchar_t* )dlg.GetPathName());
- TCollection_AsciiString aFileName (aFileNameW, '?');
+ TCollection_AsciiString aFileName ((const wchar_t* )dlg.GetPathName());
TCollection_AsciiString Message;
result = SaveSTL (aFileName.ToCString(), aHSequenceOfShape, Message);
- CString aMsg (Message.ToCString());
+ CString aMsg (TCollection_ExtendedString (Message).ToWideString());
MessageBoxW (AfxGetApp()->m_pMainWnd->m_hWnd, aMsg, result ? L"CasCade" : L"CasCade Error", result ? MB_OK : MB_ICONERROR);
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW));
}
if (dlg.DoModal() == IDOK) {
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
- TCollection_ExtendedString aFileNameW ((Standard_ExtString )(const wchar_t* )dlg.GetPathName());
- TCollection_AsciiString aFileName (aFileNameW, '?');
+ TCollection_AsciiString aFileName ((const wchar_t* )dlg.GetPathName());
TCollection_AsciiString Message;
result = SaveVRML (aFileName.ToCString(), aHSequenceOfShape, anArrayOfColors, anArrayOfTransparencies, Message);
- CString aMsg (Message.ToCString());
+ CString aMsg (TCollection_ExtendedString(Message).ToWideString());
MessageBoxW (AfxGetApp()->m_pMainWnd->m_hWnd, aMsg, result ? L"CasCade" : L"CasCade Error", result ? MB_OK : MB_ICONERROR);
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW));
}
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
CString aFileExt = anExportDlg.GetFileExt();
- TCollection_ExtendedString aFileNameW ((Standard_ExtString )(const wchar_t* )anExportDlg.GetPathName());
- TCollection_AsciiString aFileName (aFileNameW, '?');
+ TCollection_AsciiString aFileName ((const wchar_t* )anExportDlg.GetPathName());
// For vector formats use V3d_View::Export() method
if (!(aFileExt.CompareNoCase (L"ps")) || !(aFileExt.CompareNoCase (L"pdf"))