/////////////////////////////////////////////////////////////////////////////
// CViewer3dDoc commands
-void CViewer3dDoc::UpdateResultMessageDlg(CString Title, TCollection_AsciiString aMessage)
+void CViewer3dDoc::UpdateResultMessageDlg (CString theTitle, const TCollection_AsciiString& theMessage)
{
- CString text(aMessage.ToCString());
- myCResultDialog.SetText(text);
+ CString aText (theMessage.ToCString());
+ myCResultDialog.SetText (aText);
+ myCResultDialog.SetTitle(theTitle);
+}
- myCResultDialog.SetTitle(Title);
+void CViewer3dDoc::UpdateResultMessageDlg(CString theTitle, CString theMessage)
+{
+ myCResultDialog.SetText (theMessage);
+ myCResultDialog.SetTitle(theTitle);
}
void CViewer3dDoc::OnBox()
" Methods SetPlanarFaceColor and SetCylindricalFaceColor are also \n"
" defined in the User_Cylinder class. \n"
" \n");
- SetTitle("Change face color");
+ SetTitle (L"Change face color");
}
}
" \n"
" myAISContext->ActivateStandardMode(TopAbs_FACE); \n"
" \n");
- SetTitle("Standard mode: TopAbs_FACE");
+ SetTitle (L"Standard mode: TopAbs_FACE");
}
//Set edges selection mode
" \n"
" myAISContext->ActivateStandardMode(TopAbs_EDGE); \n"
" \n");
- SetTitle("Standard mode: TopAbs_EDGE");
+ SetTitle (L"Standard mode: TopAbs_EDGE");
}
// Set vertices selection mode
" \n"
" myAISContext->ActivateStandardMode(TopAbs_VERTEX); \n"
" \n");
- SetTitle("Standard mode: TopAbs_VERTEX");
+ SetTitle (L"Standard mode: TopAbs_VERTEX");
}
//Neutral selection mode
myCResultDialog.SetTitle("Standard mode: Neutral");
myCResultDialog.SetText(" myAISContext->CloseAllContexts(); \n"
" \n");
- SetTitle("Standard mode: Neutral");
+ SetTitle (L"Standard mode: Neutral");
}
// Change the color of faces on a user cylinder
{
if (!myAISContext->HasOpenedContext())
{
- AfxMessageBox("It is necessary to activate the edges selection mode\n"
- "and select edges on an object before \nrunning this function");
+ AfxMessageBox (L"It is necessary to activate the edges selection mode\n"
+ L"and select edges on an object before \nrunning this function");
return;
}
if (S.IsNull())
{
- AfxMessageBox("It is necessary to activate the edges selection mode\n"
- "and select edges on an object before \nrunning this function");
+ AfxMessageBox (L"It is necessary to activate the edges selection mode\n"
+ L"and select edges on an object before \nrunning this function");
return;
}
TopoDS_Shape aSelShape = myAISContext->SelectedShape();
if (aSelShape.ShapeType() != TopAbs_EDGE)
{
- AfxMessageBox("It is necessary to activate the edges selection mode\n\
- and select edges on an object before \nrunning this function");
+ AfxMessageBox (L"It is necessary to activate the edges selection mode\n"
+ L"and select edges on an object before \nrunning this function");
return;
}
}
}
catch (Standard_Failure)
{
- AfxMessageBox("Error During Fillet computation");
+ AfxMessageBox (L"Error During Fillet computation");
return;
}
" \n"
" myAISContext->Redisplay(S); \n"
" \n");
- SetTitle("Make a fillet");
+ SetTitle (L"Make a fillet");
}
// Create and display a circle with standard tools
" \n"
" myAISContext->Display(anAISCirc); \n"
" \n");
- SetTitle("Create a circle");
+ SetTitle (L"Create a circle");
}
void CViewer3dDoc::OnLine()
" \n"
" myAISContext->Display(anAISLine); \n"
" \n");
- SetTitle("Create a line");
+ SetTitle (L"Create a line");
}
void CViewer3dDoc::OnNbisos()
" \n"
" myAISContext->DefaultDrawer()->VIsoAspect()->SetNumber(dlg.m_isov); \n"
" \n");
- SetTitle("Iso Aspect");
+ SetTitle (L"Iso Aspect");
}
}
{
Standard_SStream aSStream;
aSStream << "An exception was caught: " << Standard_Failure::Caught() << ends;
- Standard_CString aMsg = aSStream.str().c_str();
- // aSStream.rdbuf()->freeze(0); // allow deletion of dynamic array
+ CString aMsg = aSStream.str().c_str();
AfxMessageBox (aMsg);
}
}