[commit] r1222 - trunk/GME/GMEActiveBrowser
GMESRC Repository Notifications
gme-commit at list.isis.vanderbilt.edu
Wed Mar 30 13:34:02 CDT 2011
Author: ksmyth
Date: Wed Mar 30 13:34:02 2011
New Revision: 1222
Log:
Compile under _UNICODE
Modified:
trunk/GME/GMEActiveBrowser/ActiveBrowserPropertyPage.cpp
trunk/GME/GMEActiveBrowser/AggregateContextMenu.cpp
trunk/GME/GMEActiveBrowser/AggregateOptions.cpp
trunk/GME/GMEActiveBrowser/AggregateTreeCtrl.cpp
trunk/GME/GMEActiveBrowser/AttachLibDlg.cpp
trunk/GME/GMEActiveBrowser/GMEActiveBrowser.vcxproj
trunk/GME/GMEActiveBrowser/GMEActiveBrowserCtl.cpp
trunk/GME/GMEActiveBrowser/InheritanceTreeCtrl.cpp
Modified: trunk/GME/GMEActiveBrowser/ActiveBrowserPropertyPage.cpp
==============================================================================
--- trunk/GME/GMEActiveBrowser/ActiveBrowserPropertyPage.cpp Wed Mar 30 13:00:56 2011 (r1221)
+++ trunk/GME/GMEActiveBrowser/ActiveBrowserPropertyPage.cpp Wed Mar 30 13:34:02 2011 (r1222)
@@ -202,7 +202,7 @@
reqBuildAggregateTree(hItem,ccpMgaObject,2);
m_TreeAggregate.SortItems(hItem);
pMgaContext->CommitTransaction ();
- }MSGCATCH("Error completing the operation",pMgaContext->AbortTransaction();)
+ }MSGCATCH(_T("Error completing the operation"),pMgaContext->AbortTransaction();)
}
@@ -596,7 +596,7 @@
case OBJTYPE_PART:; // Not handled
default:
{
- TRACE("Unknown MGA object type detected building the aggregation tree\n");
+ TRACE(_T("Unknown MGA object type detected building the aggregation tree\n"));
ASSERT(0);
return;
}
@@ -756,7 +756,7 @@
m_TreeAggregate.SortItems();
pMgaContext->CommitTransaction();
- }MSGCATCH("Error opening aggregate tab",pMgaContext->AbortTransaction();)
+ }MSGCATCH(_T("Error opening aggregate tab"),pMgaContext->AbortTransaction();)
@@ -803,7 +803,7 @@
m_TreeAggregate.SaveTreeStateToRegistry(m_strProjectName);
// Close transaction
pMgaContext->CommitTransaction();
- }MSGCATCH("Error closing the aggragate tab",pMgaContext->AbortTransaction();)
+ }MSGCATCH(_T("Error closing the aggragate tab"),pMgaContext->AbortTransaction();)
}
@@ -906,7 +906,7 @@
}
else
{
- MessageBox("Connections cannot be copied.","Copy Error", MB_ICONERROR);
+ MessageBox(_T("Connections cannot be copied."),_T("Copy Error"), MB_ICONERROR);
}
CGMEDataDescriptor::destructList( rectSelectedList);
@@ -1114,7 +1114,7 @@
}
else
{
- MessageBox("No object selected","Copy Error", MB_ICONERROR);
+ MessageBox(_T("No object selected"),_T("Copy Error"), MB_ICONERROR);
}
CGMEDataDescriptor::destructList( rectSelectedList);
@@ -1275,7 +1275,7 @@
}
else
{
- MessageBox("No object selected","Copy Error", MB_ICONERROR);
+ MessageBox(_T("No object selected"),_T("Copy Error"), MB_ICONERROR);
}
CGMEDataDescriptor::destructList( rectSelectedList);
@@ -1367,7 +1367,7 @@
}
else
{
- MessageBox("Connections cannot be dropped or copied.","Error", MB_ICONERROR);
+ MessageBox(_T("Connections cannot be dropped or copied."),_T("Error"), MB_ICONERROR);
}
CGMEDataDescriptor::destructList( rectSelectedList);
@@ -1541,24 +1541,24 @@
CMgaContext* pMgaContext=&pApp->m_CurrentProject.m_MgaContext;
CAttachLibDlg dlg;
- dlg.m_strCaption="Attach Library";
+ dlg.m_strCaption=_T("Attach Library");
if(dlg.DoModal() == IDOK && !dlg.m_strConnString.IsEmpty())
{
- // be flexible in MGA case ( if "MGX" is not present )
- if( dlg.m_strConnString.Left(4) == "MGX=")
+ // be flexible in MGA case ( if _T("MGX") is not present )
+ if( dlg.m_strConnString.Left(4) == _T("MGX="))
{
// add quotes to the folderpath if not there
- if( dlg.m_strConnString.Mid(4,1) != "\"" && dlg.m_strConnString.Right(1) != "\"")
- dlg.m_strConnString = "MGX=\"" + dlg.m_strConnString.Mid( 4) + "\"";
+ if( dlg.m_strConnString.Mid(4,1) != _T("\"") && dlg.m_strConnString.Right(1) != _T("\""))
+ dlg.m_strConnString = _T("MGX=\"") + dlg.m_strConnString.Mid( 4) + _T("\"");
}
else // MGA is presumed in this case
{
// add extension
- if( dlg.m_strConnString.Find( ".") == -1) dlg.m_strConnString += ".mga";
+ if( dlg.m_strConnString.Find( _T(".")) == -1) dlg.m_strConnString += _T(".mga");
// add the 'MGA=' prefix
- if( dlg.m_strConnString.Left(4) != "MGA=") dlg.m_strConnString.Insert(0, "MGA=");
+ if( dlg.m_strConnString.Left(4) != _T("MGA=")) dlg.m_strConnString.Insert(0, _T("MGA="));
}
MSGTRY {
@@ -1609,7 +1609,7 @@
}
}
- MSGCATCH("Error while trying to attach library",pMgaContext->AbortTransaction();)
+ MSGCATCH(_T("Error while trying to attach library"),pMgaContext->AbortTransaction();)
Refresh();
}
}
@@ -1650,13 +1650,13 @@
if(!bszLibName)
{
- AfxMessageBox("Selected node is not a library");
+ AfxMessageBox(_T("Selected node is not a library"));
return;
}
CAttachLibDlg dlg;
dlg.m_strConnString=bszLibName;
- dlg.m_strCaption="Refresh Library";
+ dlg.m_strCaption=_T("Refresh Library");
dlg.m_bOptimized = was_opt;
if(dlg.DoModal() == IDOK)
@@ -1668,7 +1668,7 @@
ccpFolder.Release();
pMgaContext->CommitTransaction();
}
- } MSGCATCH("Error while refreshing library",pMgaContext->AbortTransaction();)
+ } MSGCATCH(_T("Error while refreshing library"),pMgaContext->AbortTransaction();)
Refresh();
}
}
@@ -1701,12 +1701,12 @@
if(!bszLibName)
{
- AfxMessageBox("Selected node is not a library");
+ AfxMessageBox(_T("Selected node is not a library"));
}
else
{
CString msg0; CopyTo( bszLibName, msg0);
- msg0 = "Library [" + msg0 + "] dependencies";
+ msg0 = _T("Library [") + msg0 + _T("] dependencies");
CComPtr<IMgaFolders> coll_inc, coll_iby;
@@ -1714,16 +1714,16 @@
COMTHROW( ccpFolder->GetVirtuallyIncludes ( &coll_inc));
CString msg1, msg2;
- composeInfo( "Included virtually in:\n", coll_iby, msg1);
- composeInfo( "Virtually includes:\n", coll_inc, msg2);
+ composeInfo( _T("Included virtually in:\n"), coll_iby, msg1);
+ composeInfo( _T("Virtually includes:\n"), coll_inc, msg2);
- AfxMessageBox( msg0 + "\n\n" + msg1 + "\n\n" + msg2, MB_ICONINFORMATION);
+ AfxMessageBox( msg0 + _T("\n\n") + msg1 + _T("\n\n") + msg2, MB_ICONINFORMATION);
}
//pMgaContext->CommitTransaction();
pMgaContext->AbortTransaction();
- } MSGCATCH("Error while viewing library dependencies",pMgaContext->AbortTransaction();)
+ } MSGCATCH(_T("Error while viewing library dependencies"),pMgaContext->AbortTransaction();)
//Refresh();
}
}
@@ -1737,7 +1737,7 @@
if( !bszLibName)
{
ASSERT( 0);
- AfxMessageBox( "Selected node is not a library");
+ AfxMessageBox( _T("Selected node is not a library"));
return false;
}
@@ -1752,13 +1752,13 @@
CopyTo( depb, deps);
if( deps.IsEmpty())
{
- deps = "No dependent libraries found.";
+ deps = _T("No dependent libraries found.");
}
else
{
- deps = "Dependent libraries found:\n" + deps;
+ deps = _T("Dependent libraries found:\n") + deps;
}
- deps += "\n\nDelete " + ln + "?";
+ deps += _T("\n\nDelete ") + ln + _T("?");
if( IDYES == AfxMessageBox( deps, MB_YESNO))
{
//p_ccpFolder->PutReadOnlyAccess( VARIANT_FALSE);
@@ -1790,7 +1790,7 @@
MSGTRY{
CAggregateContextMenu menu(this);
menu.Run(point);
- } MSGCATCH("Cannot complete operation",pMgaContext->AbortTransaction();)
+ } MSGCATCH(_T("Cannot complete operation"),pMgaContext->AbortTransaction();)
}
@@ -1860,7 +1860,7 @@
pApp->GetCtrl()->FireRootFolderNameChanged();
}
- }MSGCATCH("Error retrieving object name",pMgaContext->AbortTransaction();)
+ }MSGCATCH(_T("Error retrieving object name"),pMgaContext->AbortTransaction();)
}
}
@@ -2346,7 +2346,7 @@
}
}
pMgaContext->CommitTransaction ();
- }MSGCATCH("Error completing the operation",pMgaContext->AbortTransaction();)
+ }MSGCATCH(_T("Error completing the operation"),pMgaContext->AbortTransaction();)
if (worked)
pApp->GetCtrl()->FireClickMgaObject(pUnknown);
@@ -2464,7 +2464,7 @@
}
pMgaContext->CommitTransaction();
}
- MSGCATCH( "Error completing the operation", pMgaContext->AbortTransaction();)
+ MSGCATCH( _T("Error completing the operation"), pMgaContext->AbortTransaction();)
if( worked)
pApp->GetCtrl()->FireClickMgaObject( pUnknown);
@@ -2491,7 +2491,7 @@
m_TreeAggregate.SortItems();
m_TreeAggregate.RestoreState();
- }MSGCATCH("Error refreshing tree browser data",pMgaContext->AbortTransaction();)
+ }MSGCATCH(_T("Error refreshing tree browser data"),pMgaContext->AbortTransaction();)
// Ending transaction
pMgaContext->CommitTransaction();
@@ -2582,10 +2582,10 @@
if( m_TreeAggregate.DoDrop( DRAGOP_COPY, &OleDataObject, CPoint( 0, 0))) {
// what about set focus back
m_TreeAggregate.SetFocus();
- } else msg = "Cannot paste data from the clipboard. Please select valid target item.";
- } else msg = "Cannot recover data from the clipboard.";
+ } else msg = _T("Cannot paste data from the clipboard. Please select valid target item.");
+ } else msg = _T("Cannot recover data from the clipboard.");
- if( !msg.IsEmpty()) MessageBox( msg, "Paste Error", MB_ICONERROR);
+ if( !msg.IsEmpty()) MessageBox( msg, _T("Paste Error"), MB_ICONERROR);
}
}break;
case 0x46: //VK_F:
@@ -2677,7 +2677,7 @@
void CAggregatePropertyPage::OnSearch()
{
- AfxMessageBox("Pushed.");
+ AfxMessageBox(_T("Pushed."));
}
BOOL CAggregatePropertyPage::OnSetActive()
@@ -2700,7 +2700,7 @@
MSGTRY{
DoDrag(pNMTreeView->ptDrag);
- } MSGCATCH("Error while dragging",pMgaContext->AbortTransaction();)
+ } MSGCATCH(_T("Error while dragging"),pMgaContext->AbortTransaction();)
*pResult = 0;
@@ -3130,7 +3130,7 @@
// Ending transaction
pMgaContext->CommitTransaction();
- }MSGCATCH("Error retrieving data for inheritance tab",pMgaContext->AbortTransaction();)
+ }MSGCATCH(_T("Error retrieving data for inheritance tab"),pMgaContext->AbortTransaction();)
// Select the current item
@@ -3186,7 +3186,7 @@
// Ending transaction
pMgaContext->CommitTransaction();
- }MSGCATCH("Error retrieving data for inheritance tab",pMgaContext->AbortTransaction();)
+ }MSGCATCH(_T("Error retrieving data for inheritance tab"),pMgaContext->AbortTransaction();)
}
void CInheritancePropertyPage::Refresh()
@@ -3208,7 +3208,7 @@
SetupTree();
m_TreeInheritance.RestoreState();
- }MSGCATCH("Error refreshing tree browser data",pMgaContext->AbortTransaction();)
+ }MSGCATCH(_T("Error refreshing tree browser data"),pMgaContext->AbortTransaction();)
// Ending transaction
pMgaContext->CommitTransaction();
}
@@ -3460,7 +3460,7 @@
COMTHROW(ccpMetaProject->get_RootFolder(&ccpRootMetaFolder));
- InsertIntoMetaTree(NULL,ccpRootMetaFolder,"");
+ InsertIntoMetaTree(NULL,ccpRootMetaFolder,_T(""));
CMetaObjectList ObjListParents;
CMetaObjectList ObjListChildren;
@@ -3583,7 +3583,7 @@
{
CComPtr<IMgaMetaConnection> ccpMetaConnection(pIMetaConnection);
- strConnectionToolTip="Name: "+GetDisplayedName(ccpMetaConnection)+"\r\n";
+ strConnectionToolTip=_T("Name: ")+GetDisplayedName(ccpMetaConnection)+_T("\r\n");
// Is the connection simple? Not simple connections are not implemented here!!!
VARIANT_BOOL bIsSimple=VARIANT_FALSE;
@@ -3604,15 +3604,15 @@
i++;
// Formatting tooltip
CString strJoint;
- strJoint.Format("Joint %d: \r\n",i);
+ strJoint.Format(_T("Joint %d: \r\n"),i);
strConnectionToolTip+=strJoint;
// Iterator renamed for sake of readability
ccpMgaMetaConnJoint = MGACOLL_ITER;
// Getting pointer specifications (source and destination)
- CComBSTR bszSourceName("src");
- CComBSTR bszDestName("dst");
+ CComBSTR bszSourceName(_T("src"));
+ CComBSTR bszDestName(_T("dst"));
CComPtr<IMgaMetaPointerSpec> ccpMgaMetaPointerSpecSrc;
CComPtr<IMgaMetaPointerSpec> ccpMgaMetaPointerSpecDest;
@@ -3622,7 +3622,7 @@
&ccpMgaMetaPointerSpecSrc) )
{
// Source side *************************************************
- CString strSrcToolTip("[Source:]\r\n");
+ CString strSrcToolTip(_T("[Source:]\r\n"));
CComPtr<IMgaMetaPointerItems> ccpMgaMetaPointerItemsSrc;
ccpMgaMetaPointerSpecSrc->get_Items(&ccpMgaMetaPointerItemsSrc);
@@ -3635,14 +3635,14 @@
COMTHROW(MGACOLL_ITER->get_Desc(&bszDesc));
// Formatting description
- strSrcToolTip+="\t"+CString(bszDesc)+"\r\n";
+ strSrcToolTip+=_T("\t")+CString(bszDesc)+_T("\r\n");
}MGACOLL_ITERATE_END; // Source Pointer Items
strConnectionToolTip+=strSrcToolTip;
}
else
{
- CString strSrcToolTip("[Source:] <not found>\r\n");
+ CString strSrcToolTip(_T("[Source:] <not found>\r\n"));
strConnectionToolTip+=strSrcToolTip;
}
@@ -3650,7 +3650,7 @@
&ccpMgaMetaPointerSpecDest))
{
// Destination side ********************************************
- CString strDestToolTip("[Destination:] \r\n");
+ CString strDestToolTip(_T("[Destination:] \r\n"));
CComPtr<IMgaMetaPointerItems> ccpMgaMetaPointerItemsDest;
ccpMgaMetaPointerSpecDest->get_Items(&ccpMgaMetaPointerItemsDest);
@@ -3663,13 +3663,13 @@
COMTHROW(MGACOLL_ITER->get_Desc(&bszDesc));
// Formatting description
- strDestToolTip+="\t"+CString(bszDesc)+"\r\n";
+ strDestToolTip+=_T("\t")+CString(bszDesc)+_T("\r\n");
}MGACOLL_ITERATE_END; // Destination pointer items
strConnectionToolTip+=strDestToolTip;
}
else
{
- CString strDestToolTip("[Destination:] <not found>\r\n");
+ CString strDestToolTip(_T("[Destination:] <not found>\r\n"));
strConnectionToolTip+=strDestToolTip;
}
@@ -3679,7 +3679,7 @@
else
{
// Not simple connection case is not implemented!!!!
- strConnectionToolTip="Information available only for simple connections.";
+ strConnectionToolTip=_T("Information available only for simple connections.");
}
}
@@ -3720,7 +3720,7 @@
MSGTRY{
SetupTree();
- }MSGCATCH("Error opening meta tab",pMgaContext->AbortTransaction();)
+ }MSGCATCH(_T("Error opening meta tab"),pMgaContext->AbortTransaction();)
}
@@ -3790,7 +3790,7 @@
}
}
}
- }MSGCATCH("Error retrieving connection properties",pMgaContext->AbortTransaction();)
+ }MSGCATCH(_T("Error retrieving connection properties"),pMgaContext->AbortTransaction();)
}
*pResult = -1;
@@ -3899,9 +3899,9 @@
// Inserting item into the meta tree
CString strName;
- if(strRoleName!="")
+ if(strRoleName!=_T(""))
{
- strName=strRoleName+" ("+GetDisplayedName(ccpMetaObject)+")";
+ strName=strRoleName+_T(" (")+GetDisplayedName(ccpMetaObject)+_T(")");
}
else
{
@@ -3965,10 +3965,10 @@
{
CComBSTR nm;
COMTHROW( fco->get_Name( &nm));
- CString msg = "There are objects primary derived from: \"";
+ CString msg = _T("There are objects primary derived from: \"");
msg += nm;
- msg += "\". Would you like to delete them as well?\n";
- msg += "If you answer 'No' the derived objects will be detached, thus preserved.";
+ msg += _T("\". Would you like to delete them as well?\n");
+ msg += _T("If you answer 'No' the derived objects will be detached, thus preserved.");
// this answer will be applied to all deriveds of this fco
int resp = AfxMessageBox( msg, MB_YESNOCANCEL);
@@ -4016,7 +4016,7 @@
COMTHROW(ccpObj->PutReadOnlyAccessWithPropagate( pbProtectIt ? VARIANT_TRUE:VARIANT_FALSE));
pMgaContext->CommitTransaction();
- } MSGCATCH("Error while applying new access rights",pMgaContext->AbortTransaction();)
+ } MSGCATCH(_T("Error while applying new access rights"),pMgaContext->AbortTransaction();)
Refresh();
}
}
@@ -4052,7 +4052,7 @@
CComBSTR gd_of_project;
COMTHROW( ccpFolder->GetGuidDisp( &gd_of_project));
// save its guid
- guidmap[ gd_of_project].push_back( CComBSTR( "Main Project"));
+ guidmap[ gd_of_project].push_back( CComBSTR( _T("Main Project")));
// check toplevel folders
COMTHROW( ccpFolder->get_ChildFolders( &fols));
@@ -4082,12 +4082,12 @@
{
if( it->second.size() > 1) // duplicates found
{
- if( msg.Length() > 0) msg.Append( "\n\n");
+ if( msg.Length() > 0) msg.Append( _T("\n\n"));
msg.AppendBSTR( it->first);
- msg.Append( "\nShared by multiple toplevel libraries:");
+ msg.Append( _T("\nShared by multiple toplevel libraries:"));
for( unsigned int i = 0; i < it->second.size(); ++i)
{
- msg.Append( "\n\t");
+ msg.Append( _T("\n\t"));
msg.AppendBSTR( it->second[i]);
}
}
@@ -4099,12 +4099,12 @@
AfxMessageBox( msgs, MB_OK | MB_ICONSTOP);
}
else
- AfxMessageBox( "No duplicate GUID found among the toplevel libraries.", MB_ICONINFORMATION);
+ AfxMessageBox( _T("No duplicate GUID found among the toplevel libraries."), MB_ICONINFORMATION);
//pMgaContext->CommitTransaction();
pMgaContext->AbortTransaction();
- } MSGCATCH("Error while analyzing library guid ambiguities",pMgaContext->AbortTransaction();)
+ } MSGCATCH(_T("Error while analyzing library guid ambiguities"),pMgaContext->AbortTransaction();)
//Refresh();
}
}
@@ -4123,7 +4123,7 @@
// no transaction needed
COMTHROW( pMgaContext->m_ccpProject->UpdateSourceControlInfo( id));
}
- MSGCATCH("Error while updating source control info!",;)
+ MSGCATCH(_T("Error while updating source control info!"),;)
Refresh();
}
@@ -4141,7 +4141,7 @@
// no transaction needed
COMTHROW( pMgaContext->m_ccpProject->SourceControlObjectOwner( p_id));
}
- MSGCATCH("Error while fetching source control info!",;)
+ MSGCATCH(_T("Error while fetching source control info!"),;)
Refresh();
}
@@ -4159,7 +4159,7 @@
// no transaction needed
COMTHROW( pMgaContext->m_ccpProject->SourceControlActiveUsers());
}
- MSGCATCH("Error while fetching source control info!",;)
+ MSGCATCH(_T("Error while fetching source control info!"),;)
Refresh();
}
@@ -4193,11 +4193,11 @@
CString cs, gs;
CopyTo( connstr, cs);
CopyTo( guiddsp, gs);
- lst += cs + " " + gs + "\n";
+ lst += cs + _T(" ") + gs + _T("\n");
}
}
}
}
- msg = p_msgText + (lst.IsEmpty()?"None":lst);
+ msg = p_msgText + (lst.IsEmpty()?_T("None"):lst);
}
Modified: trunk/GME/GMEActiveBrowser/AggregateContextMenu.cpp
==============================================================================
--- trunk/GME/GMEActiveBrowser/AggregateContextMenu.cpp Wed Mar 30 13:00:56 2011 (r1221)
+++ trunk/GME/GMEActiveBrowser/AggregateContextMenu.cpp Wed Mar 30 13:34:02 2011 (r1222)
@@ -63,7 +63,7 @@
UINT nItemID=pPopup->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON |TPM_NONOTIFY|TPM_RETURNCMD, point.x, point.y,
m_pParent);
- TRACE1("Selected menu item ID: %d\n",nItemID);
+ TRACE1(_T("Selected menu item ID: %d\n"),nItemID);
return DispatchCommand(nItemID);
}
@@ -159,7 +159,7 @@
CComBSTR bszDispName;
ccpMetaFolder->get_DisplayedName(&bszDispName);
- bszDispName=CString("New")+CString(bszDispName);
+ bszDispName=CString(_T("New"))+CString(bszDispName);
// Starting transaction
@@ -186,7 +186,7 @@
// Setting name to the newly created object
CComBSTR bszDispName;
ccpMetaFCO->get_DisplayedName(&bszDispName);
- bszDispName=CString("New")+CString(bszDispName);
+ bszDispName=CString(_T("New"))+CString(bszDispName);
// Starting transaction
CGMEActiveBrowserApp* pApp=(CGMEActiveBrowserApp*)AfxGetApp();
@@ -216,7 +216,7 @@
// Setting name to the newly created object
CComBSTR bszDispName;
ccpMetaRole->get_DisplayedName(&bszDispName);
- bszDispName=CString("New")+CString(bszDispName);
+ bszDispName=CString(_T("New"))+CString(bszDispName);
// Starting transaction
CGMEActiveBrowserApp* pApp=(CGMEActiveBrowserApp*)AfxGetApp();
@@ -266,13 +266,13 @@
if (OleDataObject.AttachClipboard() == FALSE)
{
- m_pParent->MessageBox("Cannot recover data from the clipboard.","Paste Error",MB_ICONERROR);
+ m_pParent->MessageBox(_T("Cannot recover data from the clipboard."),_T("Paste Error"),MB_ICONERROR);
}
else
{
if(!m_pParent->m_TreeAggregate.DoDrop(DRAGOP_COPY,&OleDataObject,CPoint(0,0)))
{
- m_pParent->MessageBox("Cannot paste data from the clipboard. Please select valid target item.","Paste Error",MB_ICONERROR);
+ m_pParent->MessageBox(_T("Cannot paste data from the clipboard. Please select valid target item."),_T("Paste Error"),MB_ICONERROR);
}
}
}
@@ -283,13 +283,13 @@
if (OleDataObject.AttachClipboard() == FALSE)
{
- m_pParent->MessageBox("Cannot recover data from the clipboard.","Paste Error",MB_ICONERROR);
+ m_pParent->MessageBox(_T("Cannot recover data from the clipboard."),_T("Paste Error"),MB_ICONERROR);
}
else
{
if(!m_pParent->m_TreeAggregate.DoDrop(DRAGOP_REFERENCE,&OleDataObject,CPoint(0,0)))
{
- m_pParent->MessageBox("Cannot paste data from the clipboard. Please select valid target item.","Paste Error",MB_ICONERROR);
+ m_pParent->MessageBox(_T("Cannot paste data from the clipboard. Please select valid target item."),_T("Paste Error"),MB_ICONERROR);
}
}
}
@@ -300,13 +300,13 @@
if (OleDataObject.AttachClipboard() == FALSE)
{
- m_pParent->MessageBox("Cannot recover data from the clipboard.","Paste Error",MB_ICONERROR);
+ m_pParent->MessageBox(_T("Cannot recover data from the clipboard."),_T("Paste Error"),MB_ICONERROR);
}
else
{
if(!m_pParent->m_TreeAggregate.DoDrop(DRAGOP_SUBTYPE,&OleDataObject,CPoint(0,0)))
{
- m_pParent->MessageBox("Cannot paste data from the clipboard. Please select valid target item.","Paste Error",MB_ICONERROR);
+ m_pParent->MessageBox(_T("Cannot paste data from the clipboard. Please select valid target item."),_T("Paste Error"),MB_ICONERROR);
}
}
}
@@ -317,13 +317,13 @@
if (OleDataObject.AttachClipboard() == FALSE)
{
- m_pParent->MessageBox("Cannot recover data from the clipboard.","Paste Error",MB_ICONERROR);
+ m_pParent->MessageBox(_T("Cannot recover data from the clipboard."),_T("Paste Error"),MB_ICONERROR);
}
else
{
if(!m_pParent->m_TreeAggregate.DoDrop(DRAGOP_INSTANCE,&OleDataObject,CPoint(0,0)))
{
- m_pParent->MessageBox("Cannot paste data from the clipboard. Please select valid target item.","Paste Error",MB_ICONERROR);
+ m_pParent->MessageBox(_T("Cannot paste data from the clipboard. Please select valid target item."),_T("Paste Error"),MB_ICONERROR);
}
}
}
@@ -334,13 +334,13 @@
if (OleDataObject.AttachClipboard() == FALSE)
{
- m_pParent->MessageBox("Cannot recover data from the clipboard.","Paste Error",MB_ICONERROR);
+ m_pParent->MessageBox(_T("Cannot recover data from the clipboard."),_T("Paste Error"),MB_ICONERROR);
}
else
{
if(!m_pParent->m_TreeAggregate.DoDropWithoutChecking( merge?DRAGOP_CLOSURE_MERGE:DRAGOP_CLOSURE, &OleDataObject,CPoint(0,0)))
{
- m_pParent->MessageBox("Cannot paste data from the clipboard. Please select valid target item.","Paste Error",MB_ICONERROR);
+ m_pParent->MessageBox(_T("Cannot paste data from the clipboard. Please select valid target item."),_T("Paste Error"),MB_ICONERROR);
}
}
}
@@ -422,7 +422,7 @@
// Collection for the selected FCOs
CComPtr<IMgaFCOs> ccpSelFCOs;
- COMTHROW(ccpSelFCOs.CoCreateInstance(OLESTR("Mga.MgaFCOs")));
+ COMTHROW(ccpSelFCOs.CoCreateInstance(L"Mga.MgaFCOs"));
/* Iterating through the selected items in the tree control creating an FCO collection*/
@@ -662,8 +662,8 @@
if( hItem == m_pParent->m_TreeAggregate.GetRootItem()) // RootFolder
{
- ModifyMenu( ID_POPUP_REFRESH_LIBRARY, MF_BYCOMMAND, ID_POPUP_LIBRARY_AMBIGUITYCHK, "Chec&k GUID ambiguity...");
- ModifyMenu( ID_POPUP_ATTRIBUTES, MF_BYCOMMAND|MF_STRING, ID_POPUP_ATTRIBUTES, "&Project Preferences");
+ ModifyMenu( ID_POPUP_REFRESH_LIBRARY, MF_BYCOMMAND, ID_POPUP_LIBRARY_AMBIGUITYCHK, _T("Chec&k GUID ambiguity..."));
+ ModifyMenu( ID_POPUP_ATTRIBUTES, MF_BYCOMMAND|MF_STRING, ID_POPUP_ATTRIBUTES, _T("&Project Preferences"));
}
else
{
@@ -674,7 +674,7 @@
if( m_pParent->m_TreeAggregate.IsLibrary(MgaObjectProxy.m_pMgaObject, &has_dependency))
{ // library folder
if( has_dependency)
- InsertMenu( ID_POPUP_REFRESH_LIBRARY, MF_BYCOMMAND|MF_STRING, ID_POPUP_LIBRARY_DEPENDENCIES, "D&ependencies...");
+ InsertMenu( ID_POPUP_REFRESH_LIBRARY, MF_BYCOMMAND|MF_STRING, ID_POPUP_LIBRARY_DEPENDENCIES, _T("D&ependencies..."));
DeleteMenu( ID_POPUP_ATTACH_LIBRARY, MF_BYCOMMAND);
}
@@ -735,7 +735,7 @@
case OBJTYPE_REFERENCE:
{
- InsertMenu( ID_POPUP_REFRESH_LIBRARY, MF_BYCOMMAND, ID_POPUP_FOLLOWREF, "&Follow Reference");
+ InsertMenu( ID_POPUP_REFRESH_LIBRARY, MF_BYCOMMAND, ID_POPUP_FOLLOWREF, _T("&Follow Reference"));
insertionsSeparatorPosition++;
}// no break here!
default:
@@ -804,7 +804,7 @@
// will automatically destroy it
if(mnuInsertFolder.GetMenuItemCount()!=NULL)
{
- InsertMenu(ID_POPUP_INSERTIONS,MF_POPUP|MF_STRING,(UINT)mnuInsertFolder.GetSafeHmenu(),"Insert &Folder");
+ InsertMenu(ID_POPUP_INSERTIONS,MF_POPUP|MF_STRING,(UINT)mnuInsertFolder.GetSafeHmenu(),_T("Insert &Folder"));
mnuInsertFolder.Detach();
}
@@ -879,28 +879,28 @@
// Append Atom
if(mnuInsertAtom.GetMenuItemCount()!=NULL)
{
- InsertMenu(ID_POPUP_INSERTIONS,MF_POPUP|MF_STRING,(UINT)mnuInsertAtom.GetSafeHmenu(),"Insert &Atom");
+ InsertMenu(ID_POPUP_INSERTIONS,MF_POPUP|MF_STRING,(UINT)mnuInsertAtom.GetSafeHmenu(),_T("Insert &Atom"));
mnuInsertAtom.Detach();
}
// Append Model
if(mnuInsertModel.GetMenuItemCount()!=NULL)
{
- InsertMenu(ID_POPUP_INSERTIONS,MF_POPUP|MF_STRING,(UINT)mnuInsertModel.GetSafeHmenu(),"Insert &Model");
+ InsertMenu(ID_POPUP_INSERTIONS,MF_POPUP|MF_STRING,(UINT)mnuInsertModel.GetSafeHmenu(),_T("Insert &Model"));
mnuInsertModel.Detach();
}
// Append Reference
if(mnuInsertReference.GetMenuItemCount()!=NULL)
{
- InsertMenu(ID_POPUP_INSERTIONS,MF_POPUP|MF_STRING,(UINT)mnuInsertReference.GetSafeHmenu(),"Insert &Reference");
+ InsertMenu(ID_POPUP_INSERTIONS,MF_POPUP|MF_STRING,(UINT)mnuInsertReference.GetSafeHmenu(),_T("Insert &Reference"));
mnuInsertReference.Detach();
}
// Append Set
if(mnuInsertSet.GetMenuItemCount()!=NULL)
{
- InsertMenu(ID_POPUP_INSERTIONS,MF_POPUP|MF_STRING,(UINT)mnuInsertSet.GetSafeHmenu(),"Insert &Set");
+ InsertMenu(ID_POPUP_INSERTIONS,MF_POPUP|MF_STRING,(UINT)mnuInsertSet.GetSafeHmenu(),_T("Insert &Set"));
mnuInsertSet.Detach();
}
@@ -1025,28 +1025,28 @@
// Append Atom
if(mnuInsertAtom.GetMenuItemCount()!=NULL)
{
- InsertMenu(ID_POPUP_INSERTIONS,MF_POPUP|MF_STRING,(UINT)mnuInsertAtom.GetSafeHmenu(),"Insert &Atom");
+ InsertMenu(ID_POPUP_INSERTIONS,MF_POPUP|MF_STRING,(UINT)mnuInsertAtom.GetSafeHmenu(),_T("Insert &Atom"));
mnuInsertAtom.Detach();
}
// Append Model
if(mnuInsertModel.GetMenuItemCount()!=NULL)
{
- InsertMenu(ID_POPUP_INSERTIONS,MF_POPUP|MF_STRING,(UINT)mnuInsertModel.GetSafeHmenu(),"Insert &Model");
+ InsertMenu(ID_POPUP_INSERTIONS,MF_POPUP|MF_STRING,(UINT)mnuInsertModel.GetSafeHmenu(),_T("Insert &Model"));
mnuInsertModel.Detach();
}
// Append Reference
if(mnuInsertReference.GetMenuItemCount()!=NULL)
{
- InsertMenu(ID_POPUP_INSERTIONS,MF_POPUP|MF_STRING,(UINT)mnuInsertReference.GetSafeHmenu(),"Insert &Reference");
+ InsertMenu(ID_POPUP_INSERTIONS,MF_POPUP|MF_STRING,(UINT)mnuInsertReference.GetSafeHmenu(),_T("Insert &Reference"));
mnuInsertReference.Detach();
}
// Append Set
if(mnuInsertSet.GetMenuItemCount()!=NULL)
{
- InsertMenu(ID_POPUP_INSERTIONS,MF_POPUP|MF_STRING,(UINT)mnuInsertSet.GetSafeHmenu(),"Insert &Set");
+ InsertMenu(ID_POPUP_INSERTIONS,MF_POPUP|MF_STRING,(UINT)mnuInsertSet.GetSafeHmenu(),_T("Insert &Set"));
mnuInsertSet.Detach();
}
}
@@ -1159,7 +1159,7 @@
{
m_pParent->ProjectSourceControlUpdate(0);
}
- MSGCATCH("Error while updating source control info for the project!",;)
+ MSGCATCH(_T("Error while updating source control info for the project!"),;)
}
else if(m_pParent->m_TreeAggregate.m_MgaMap.LookupObjectUnknown(hItem,pUnknown))
{
@@ -1185,14 +1185,14 @@
pMgaContext->CommitTransaction();
}
- MSGCATCH("Error while updating source control info!",pMgaContext->AbortTransaction();)
+ MSGCATCH(_T("Error while updating source control info!"),pMgaContext->AbortTransaction();)
MSGTRY
{
// it will open and commit its own transaction
m_pParent->ProjectSourceControlUpdate( id);
}
- MSGCATCH("Error while updating source control info!",;)
+ MSGCATCH(_T("Error while updating source control info!"),;)
//if( ccpMgaModel || ccpMgaFolder)
// m_pParent->Refresh();
@@ -1206,7 +1206,7 @@
// it will open and commit its own transaction
m_pParent->SourceControlActiveUsers();
}
- MSGCATCH("Error while updating source control info!",;)
+ MSGCATCH(_T("Error while updating source control info!"),;)
}
void CAggregateContextMenu::OnUsersOwner()
@@ -1238,14 +1238,14 @@
// Ending transaction
pMgaContext->CommitTransaction();
}
- MSGCATCH("Error while updating source control info!",pMgaContext->AbortTransaction();)
+ MSGCATCH(_T("Error while updating source control info!"),pMgaContext->AbortTransaction();)
MSGTRY
{
// it will open and commit its own transaction
m_pParent->SourceControlObjectOwner( id);
}
- MSGCATCH("Error while updating source control info!",;)
+ MSGCATCH(_T("Error while updating source control info!"),;)
//if( ccpMgaModel || ccpMgaFolder)
@@ -1302,14 +1302,14 @@
// Ending transaction
pMgaContext->CommitTransaction();
}
- MSGCATCH( "Error while following reference!", pMgaContext->AbortTransaction();)
+ MSGCATCH( _T("Error while following reference!"), pMgaContext->AbortTransaction();)
MSGTRY
{
- if( !ccpTgt) AfxMessageBox( "Null reference can't be followed!");
+ if( !ccpTgt) AfxMessageBox( _T("Null reference can't be followed!"));
else m_pParent->GotoIUnkPtr( ccpTgt);
}
- MSGCATCH( "Error while following reference!", ;)
+ MSGCATCH( _T("Error while following reference!"), ;)
}
}
Modified: trunk/GME/GMEActiveBrowser/AggregateOptions.cpp
==============================================================================
--- trunk/GME/GMEActiveBrowser/AggregateOptions.cpp Wed Mar 30 13:00:56 2011 (r1221)
+++ trunk/GME/GMEActiveBrowser/AggregateOptions.cpp Wed Mar 30 13:34:02 2011 (r1222)
@@ -42,16 +42,16 @@
void CAggregateOptions::SaveToRegistry()
{
CGMEActiveBrowserApp* pApp=(CGMEActiveBrowserApp*)AfxGetApp();
- pApp->WriteProfileInt("Settings","Display Models",m_bDispModel);
- pApp->WriteProfileInt("Settings","Display Atoms",m_bDispAtom);
- pApp->WriteProfileInt("Settings","Display References",m_bDispReference);
- pApp->WriteProfileInt("Settings","Display Sets",m_bDispSet);
- pApp->WriteProfileInt("Settings","Display Connections",m_bDispConnections);
+ pApp->WriteProfileInt(_T("Settings"),_T("Display Models"),m_bDispModel);
+ pApp->WriteProfileInt(_T("Settings"),_T("Display Atoms"),m_bDispAtom);
+ pApp->WriteProfileInt(_T("Settings"),_T("Display References"),m_bDispReference);
+ pApp->WriteProfileInt(_T("Settings"),_T("Display Sets"),m_bDispSet);
+ pApp->WriteProfileInt(_T("Settings"),_T("Display Connections"),m_bDispConnections);
- pApp->WriteProfileInt("Settings","Sort Option",m_soSortOptions);
- pApp->WriteProfileInt("Settings","Store Tree In Registry",m_bStoreTreeInRegistry);
+ pApp->WriteProfileInt(_T("Settings"),_T("Sort Option"),m_soSortOptions);
+ pApp->WriteProfileInt(_T("Settings"),_T("Store Tree In Registry"),m_bStoreTreeInRegistry);
- pApp->WriteProfileInt("Settings","Dynamic Loading",m_bIsDynamicLoading);
+ pApp->WriteProfileInt(_T("Settings"),_T("Dynamic Loading"),m_bIsDynamicLoading);
}
void CAggregateOptions::LoadFromRegistry()
@@ -60,50 +60,50 @@
CGMEActiveBrowserApp* pApp=(CGMEActiveBrowserApp*)AfxGetApp();
- int nValue=pApp->GetProfileInt("Settings","Display Models",NO_VALUE);
+ int nValue=pApp->GetProfileInt(_T("Settings"),_T("Display Models"),NO_VALUE);
if(nValue!=NO_VALUE)
{
m_bDispModel=nValue;
}
- nValue=pApp->GetProfileInt("Settings","Display Atoms",NO_VALUE);
+ nValue=pApp->GetProfileInt(_T("Settings"),_T("Display Atoms"),NO_VALUE);
if(nValue!=NO_VALUE)
{
m_bDispAtom=nValue;
}
- nValue=pApp->GetProfileInt("Settings","Display Connections",NO_VALUE);
+ nValue=pApp->GetProfileInt(_T("Settings"),_T("Display Connections"),NO_VALUE);
if(nValue!=NO_VALUE)
{
m_bDispConnections=nValue;
}
- nValue=pApp->GetProfileInt("Settings","Display References",NO_VALUE);
+ nValue=pApp->GetProfileInt(_T("Settings"),_T("Display References"),NO_VALUE);
if(nValue!=NO_VALUE)
{
m_bDispReference=nValue;
}
- nValue=pApp->GetProfileInt("Settings","Display Sets",NO_VALUE);
+ nValue=pApp->GetProfileInt(_T("Settings"),_T("Display Sets"),NO_VALUE);
if(nValue!=NO_VALUE)
{
m_bDispSet=nValue;
}
- nValue=pApp->GetProfileInt("Settings","Store Tree In Registry",NO_VALUE);
+ nValue=pApp->GetProfileInt(_T("Settings"),_T("Store Tree In Registry"),NO_VALUE);
if(nValue!=NO_VALUE)
{
m_bStoreTreeInRegistry=nValue;
}
- nValue=pApp->GetProfileInt("Settings","Dynamic Loading",NO_VALUE);
+ nValue=pApp->GetProfileInt(_T("Settings"),_T("Dynamic Loading"),NO_VALUE);
if(nValue!=NO_VALUE)
{
m_bIsDynamicLoading=nValue;
}
- nValue=pApp->GetProfileInt("Settings","Sort Option",NO_VALUE);
+ nValue=pApp->GetProfileInt(_T("Settings"),_T("Sort Option"),NO_VALUE);
if(nValue!=NO_VALUE)
{
m_soSortOptions=(eSortOptions)nValue;
Modified: trunk/GME/GMEActiveBrowser/AggregateTreeCtrl.cpp
==============================================================================
--- trunk/GME/GMEActiveBrowser/AggregateTreeCtrl.cpp Wed Mar 30 13:00:56 2011 (r1221)
+++ trunk/GME/GMEActiveBrowser/AggregateTreeCtrl.cpp Wed Mar 30 13:34:02 2011 (r1222)
@@ -220,9 +220,9 @@
HKEY hKey; // handle to key to enumerate
DWORD dwIndex=0; // subkey index
- char szName[255]; // subkey name
+ TCHAR szName[255]; // subkey name
DWORD lName=254; // size of subkey buffer
- char szClass[255]; // class string buffer
+ TCHAR szClass[255]; // class string buffer
DWORD lClass; // size of class string buffer
FILETIME ftLastWriteTime; // last write time
@@ -237,7 +237,7 @@
SystemTimeToFileTime(&stSystemTime, &ftOldestWriteTime);
// Getting the key of Tree Data
- hKey=AfxGetApp()->GetSectionKey("TreeData");
+ hKey=AfxGetApp()->GetSectionKey(_T("TreeData"));
for(dwIndex=0;
ERROR_NO_MORE_ITEMS!=
@@ -431,7 +431,7 @@
// Getting item state
UINT nItemState=CTreeCtrlEx::GetItemState(hItem,0x000000ff);
CString strItemState;
- strItemState.Format("%ul",nItemState);
+ strItemState.Format(_T("%ul"),nItemState);
// Searching the map for the Mga pointer
LPUNKNOWN pUnknown;
@@ -506,8 +506,8 @@
CString strItemState;
if(m_StateBuffer.Lookup(strID,strItemState))
{
- char* pszEndPtr=NULL;
- UINT nItemState=strtoul(strItemState,&pszEndPtr,10);
+ TCHAR* pszEndPtr=NULL;
+ UINT nItemState=_tcstoul(strItemState,&pszEndPtr,10);
CMgaMappedTreeCtrl::SetItemState(hItem,nItemState);
}
}
@@ -563,7 +563,7 @@
{
CString strItem1 = pTreeCtrl->GetItemText(hItem1);
CString strItem2 = pTreeCtrl->GetItemText(hItem2);
- return -strcmp(strItem2, strItem1);
+ return -_tcscmp(strItem2, strItem1);
}break;
case SORT_BYTYPE:
{
@@ -578,7 +578,7 @@
{
CString strItem1 = pTreeCtrl->GetItemText(hItem1);
CString strItem2 = pTreeCtrl->GetItemText(hItem2);
- return -strcmp(strItem2, strItem1);
+ return -_tcscmp(strItem2, strItem1);
}
@@ -703,7 +703,7 @@
if (t_guid != GUID_NULL)
{
CString str_guid;
- str_guid.Format("{%08lX-%04X-%04x-%02X%02X-%02X%02X%02X%02X%02X%02X}",
+ str_guid.Format(_T("{%08lX-%04X-%04x-%02X%02X-%02X%02X%02X%02X%02X%02X}"),
t_guid.Data1, t_guid.Data2, t_guid.Data3,
t_guid.Data4[0], t_guid.Data4[1], t_guid.Data4[2], t_guid.Data4[3],
t_guid.Data4[4], t_guid.Data4[5], t_guid.Data4[6], t_guid.Data4[7]);
@@ -813,7 +813,7 @@
CComQIPtr<IMgaObject> ccpTargetObject(MgaObjectProxy.m_pMgaObject);
if(!ccpTargetObject)
{
- MessageBox("Invalid target type.","Error",MB_OK|MB_ICONERROR);
+ MessageBox(_T("Invalid target type."),_T("Error"),MB_OK|MB_ICONERROR);
return FALSE;
}
@@ -821,11 +821,11 @@
if (!CGMEDataSource::IsGmeNativeDataAvailable(pDataObject,pMgaContext->m_ccpProject))
{
if (!CGMEDataSource::IsXMLDataAvailable(pDataObject)) {
- MessageBox("Unknown clipboard format.","Error",MB_OK|MB_ICONERROR);
+ MessageBox(_T("Unknown clipboard format."),_T("Error"),MB_OK|MB_ICONERROR);
return FALSE;
}
if (doDragOp != DRAGOP_COPY && doDragOp != DRAGOP_CLOSURE && doDragOp != DRAGOP_CLOSURE_MERGE) {
- MessageBox("Only copy operation is supported on GME XML clipboard format.","Error",MB_OK|MB_ICONERROR);
+ MessageBox(_T("Only copy operation is supported on GME XML clipboard format."),_T("Error"),MB_OK|MB_ICONERROR);
return FALSE;
}
@@ -892,7 +892,7 @@
}
pMgaContext->CommitTransaction ();
}
- } MSGCATCH ("Error completing PartBrowser drop operation", pMgaContext->AbortTransaction ();)
+ } MSGCATCH (_T("Error completing PartBrowser drop operation"), pMgaContext->AbortTransaction ();)
return bRetVal;
}
@@ -960,7 +960,7 @@
CComBSTR msg( L"Object '"), nm;
COMTHROW( MGACOLL_ITER->get_Name( &nm));
msg.Append( nm);
- msg.Append( "' could not be derived. Some of its ancestors or descendants may be already derived! [Error code E_MGA_NOT_DERIVABLE]");
+ msg.Append( _T("' could not be derived. Some of its ancestors or descendants may be already derived! [Error code E_MGA_NOT_DERIVABLE]"));
Utils::put2Console( Utils::get_GME( pMgaContext->m_ccpProject), msg, MSG_ERROR);
pMgaContext->AbortTransaction();//COMTHROW( hr);
return FALSE;//break; // although it was inside a MGACOLL_ITERATE, we aborted the trans
@@ -985,7 +985,7 @@
CComBSTR msg( L"Object '"), nm;
COMTHROW( MGACOLL_ITER->get_Name( &nm));
msg.Append( nm);
- msg.Append( "' could not be derived. Some of its ancestors or descendants may be already derived! [Error code E_MGA_NOT_DERIVABLE]");
+ msg.Append( L"' could not be derived. Some of its ancestors or descendants may be already derived! [Error code E_MGA_NOT_DERIVABLE]");
Utils::put2Console( Utils::get_GME( pMgaContext->m_ccpProject), msg, MSG_ERROR);
pMgaContext->AbortTransaction();//COMTHROW( hr);
return FALSE;//break; // although it was inside a MGACOLL_ITERATE, we aborted the trans
@@ -1009,7 +1009,7 @@
{
COMTHROW( ccpDroppedFolders->get_Count( &fol_cnt));
if ( fol_cnt > 0)
- AfxMessageBox("Cannot insert folders into a model");
+ AfxMessageBox(_T("Cannot insert folders into a model"));
}
CComQIPtr<IMgaModel> ccpTargetModel(MgaObjectProxy.m_pMgaObject);
@@ -1203,7 +1203,7 @@
CComBSTR msg( L"Object '"), nm;
COMTHROW( ccpFCO->get_Name( &nm));
msg.Append( nm);
- msg.Append( "' could not be derived. Some of its ancestors or descendants may be already derived! [Error code E_MGA_NOT_DERIVABLE]");
+ msg.Append( L"' could not be derived. Some of its ancestors or descendants may be already derived! [Error code E_MGA_NOT_DERIVABLE]");
Utils::put2Console( Utils::get_GME( pMgaContext->m_ccpProject), msg, MSG_ERROR);
pMgaContext->AbortTransaction();//COMTHROW( hr);
@@ -1223,7 +1223,7 @@
}
pMgaContext->CommitTransaction();
- }MSGCATCH("Error completing drop operation",pMgaContext->AbortTransaction();)
+ }MSGCATCH(_T("Error completing drop operation"), pMgaContext->AbortTransaction();)
Modified: trunk/GME/GMEActiveBrowser/AttachLibDlg.cpp
==============================================================================
--- trunk/GME/GMEActiveBrowser/AttachLibDlg.cpp Wed Mar 30 13:00:56 2011 (r1221)
+++ trunk/GME/GMEActiveBrowser/AttachLibDlg.cpp Wed Mar 30 13:34:02 2011 (r1222)
@@ -58,16 +58,16 @@
void CAttachLibDlg::OnBrowse()
{
- static char BASED_CODE szFilter[] = "Binary Project Files (*.mga)|*.mga|Multiuser Project Files (*.mgx)|*.mgx|All Files (*.*)|*.*||";
+ static TCHAR BASED_CODE szFilter[] = _T("Binary Project Files (*.mga)|*.mga|Multiuser Project Files (*.mgx)|*.mgx|All Files (*.*)|*.*||");
- CFileDialog dlg(TRUE,"mga",NULL,NULL,szFilter, this);
+ CFileDialog dlg(TRUE,_T("mga"),NULL,NULL,szFilter, this);
if(dlg.DoModal()!=IDOK) return;
- bool is_mga = dlg.GetFileExt().CompareNoCase( "mga") == 0;
+ bool is_mga = dlg.GetFileExt().CompareNoCase( _T("mga")) == 0;
if( is_mga)
- m_strConnString = "MGA=" + dlg.GetPathName();
+ m_strConnString = _T("MGA=") + dlg.GetPathName();
else
- m_strConnString = "MGX=\"" + dlg.GetPathName().Left( dlg.GetPathName().ReverseFind( '\\')) + "\"";
+ m_strConnString = _T("MGX=\"") + dlg.GetPathName().Left( dlg.GetPathName().ReverseFind( '\\')) + _T("\"");
UpdateData(FALSE);
@@ -76,7 +76,7 @@
BOOL CAttachLibDlg::OnInitDialog()
{
// convenience for beta-testers
- int pos = m_strConnString.Find( " (optimized)");
+ int pos = m_strConnString.Find( _T(" (optimized)"));
if( pos != -1) // remove if found
{
m_bOptimized = TRUE;
@@ -87,15 +87,15 @@
// show the expanded path as a hint
// when env variable found
CString hint = m_strConnString;
- pos = hint.Find( "%");
+ pos = hint.Find( _T("%"));
if( pos != -1) // found
{
- int npos = hint.Find( "%", pos + 1); //next pos
+ int npos = hint.Find( _T("%"), pos + 1); //next pos
if( npos != -1 && npos > pos + 1)
{
// get the value of the environment variable between the two %'s
- char *value = getenv( hint.Mid( pos + 1, npos - pos - 1));
- hint.Replace( "%" + hint.Mid( pos + 1, npos - pos - 1) + "%", value);
+ TCHAR *value = _tgetenv( hint.Mid( pos + 1, npos - pos - 1));
+ hint.Replace( _T("%") + hint.Mid( pos + 1, npos - pos - 1) + _T("%"), value);
}
}
@@ -103,7 +103,7 @@
CWnd *ptr = GetDlgItem( IDC_CONNSTR);
if( ptr && hint != m_strConnString)
{
- // replace "Mga Connection String" with expanded path
+ // replace _T("Mga Connection String") with expanded path
ptr->SetWindowText( (LPCTSTR) hint);
}
Modified: trunk/GME/GMEActiveBrowser/GMEActiveBrowser.vcxproj
==============================================================================
--- trunk/GME/GMEActiveBrowser/GMEActiveBrowser.vcxproj Wed Mar 30 13:00:56 2011 (r1221)
+++ trunk/GME/GMEActiveBrowser/GMEActiveBrowser.vcxproj Wed Mar 30 13:34:02 2011 (r1222)
@@ -23,13 +23,13 @@
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>Dynamic</UseOfMfc>
<UseOfAtl>Dynamic</UseOfAtl>
- <CharacterSet>MultiByte</CharacterSet>
+ <CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseOfMfc>Dynamic</UseOfMfc>
<UseOfAtl>Dynamic</UseOfAtl>
- <CharacterSet>MultiByte</CharacterSet>
+ <CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
Modified: trunk/GME/GMEActiveBrowser/GMEActiveBrowserCtl.cpp
==============================================================================
--- trunk/GME/GMEActiveBrowser/GMEActiveBrowserCtl.cpp Wed Mar 30 13:00:56 2011 (r1221)
+++ trunk/GME/GMEActiveBrowser/GMEActiveBrowserCtl.cpp Wed Mar 30 13:34:02 2011 (r1222)
@@ -247,7 +247,7 @@
m_pPropFrame->MoveWindow(rcBounds, TRUE);
} else {
pdc->FillRect(rcBounds, CBrush::FromHandle((HBRUSH) GetStockObject(WHITE_BRUSH)));
- pdc->TextOut(rcBounds.left + 1, rcBounds.top + 1, "GME ActiveBrowser");
+ pdc->TextOut(rcBounds.left + 1, rcBounds.top + 1, _T("GME ActiveBrowser"));
}
}
@@ -688,7 +688,7 @@
}catch (hresult_exception &)
{
- MessageBox("Error opening project","Error",MB_ICONERROR|MB_OK);
+ MessageBox(_T("Error opening project"),_T("Error"),MB_ICONERROR|MB_OK);
}
}
Modified: trunk/GME/GMEActiveBrowser/InheritanceTreeCtrl.cpp
==============================================================================
--- trunk/GME/GMEActiveBrowser/InheritanceTreeCtrl.cpp Wed Mar 30 13:00:56 2011 (r1221)
+++ trunk/GME/GMEActiveBrowser/InheritanceTreeCtrl.cpp Wed Mar 30 13:34:02 2011 (r1222)
@@ -149,7 +149,7 @@
// Getting item state
UINT nItemState=CTreeCtrlEx::GetItemState(hItem,0x000000ff);
CString strItemState;
- strItemState.Format("%ul",nItemState);
+ strItemState.Format(_T("%ul"),nItemState);
// Searching the map for the Mga pointer
LPUNKNOWN pUnknown;
@@ -224,8 +224,8 @@
CString strItemState;
if(m_StateBuffer.Lookup(strID,strItemState))
{
- char* pszEndPtr=NULL;
- UINT nItemState=strtoul(strItemState,&pszEndPtr,10);
+ TCHAR* pszEndPtr=NULL;
+ UINT nItemState = _tcstoul(strItemState, &pszEndPtr, 10);
CMgaMappedTreeCtrl::SetItemState(hItem,nItemState);
}
}
More information about the gme-commit
mailing list