[commit] r1264 - in trunk/SDK/BON: Common Wizard/Templates/1033

GMESRC Repository Notifications gme-commit at list.isis.vanderbilt.edu
Tue Apr 12 14:48:34 CDT 2011


Author: ksmyth
Date: Tue Apr 12 14:48:33 2011
New Revision: 1264

Log:
UNICODE support

Modified:
   trunk/SDK/BON/Common/Builder.cpp
   trunk/SDK/BON/Common/Builder.h
   trunk/SDK/BON/Common/ComponentObj.cpp
   trunk/SDK/BON/Common/ComponentObj.h
   trunk/SDK/BON/Common/Exceptions.h
   trunk/SDK/BON/Common/Extensions.cpp
   trunk/SDK/BON/Common/Formatter.cpp
   trunk/SDK/BON/Common/GMECOM.H
   trunk/SDK/BON/Common/Utils.cpp
   trunk/SDK/BON/Common/Utils.h
   trunk/SDK/BON/Wizard/Templates/1033/ComponentConfig.h
   trunk/SDK/BON/Wizard/Templates/1033/RawComponent.cpp

Modified: trunk/SDK/BON/Common/Builder.cpp
==============================================================================
--- trunk/SDK/BON/Common/Builder.cpp	Tue Apr 12 13:34:17 2011	(r1263)
+++ trunk/SDK/BON/Common/Builder.cpp	Tue Apr 12 14:48:33 2011	(r1264)
@@ -710,7 +710,7 @@
 
 void CBuilderObject::GetNamePath(CString &namePath) const
 {
-	GetExtendedName(namePath,"__",true);
+	GetExtendedName(namePath, _T("__"),true);
 }
 
 void CBuilderObject::GetExtendedName(CString &extName,CString separator,bool startWithRoot) const
@@ -784,7 +784,7 @@
 {
 	CString namePath;
 	GetNamePath(namePath);
-	AfxMessageBox(msg + "\n" + namePath,error ? MB_OK | MB_ICONSTOP : MB_OK);
+	AfxMessageBox(msg + _T("\n") + namePath,error ? MB_OK | MB_ICONSTOP : MB_OK);
 }
 
 
@@ -2743,7 +2743,7 @@
 
 int MyMessageBox(LPCTSTR lpszText, UINT nType = MB_OK)
 {
-	return ::MessageBox(NULL, lpszText, "Builder Factory Error", nType);
+	return ::MessageBox(NULL, lpszText, _T("Builder Factory Error"), nType);
 }
 
 CBuilderFactory::~CBuilderFactory()
@@ -2799,17 +2799,17 @@
 	}
 	while( !kindnames.IsEmpty() )
 	{
-		CString trash = kindnames.SpanIncluding(",;");
+		CString trash = kindnames.SpanIncluding(_T(",;"));
 		kindnames = kindnames.Mid(trash.GetLength());
 		if( kindnames.IsEmpty() )
 			break;
-		CString kindname = kindnames.SpanExcluding(",;");
+		CString kindname = kindnames.SpanExcluding(_T(",;"));
 		kindnames = kindnames.Mid(kindname.GetLength());
 		ASSERT(!kindname.IsEmpty());
 
 		CBuilderModelCreateFunction fn;
 		if(modelBuildFunctions->Lookup(kindname,fn)) {
-			CString msg = "Create function already exists for object type " + kindname;
+			CString msg = _T("Create function already exists for object type ") + kindname;
 			MyMessageBox(msg,MB_OK | MB_ICONSTOP);
 			return;
 		}
@@ -2832,7 +2832,7 @@
 		if( modelkindnames.Find(kindname) == NULL )
 		{
 			CString msg;
-			msg.Format("Model kindname \"%s\" was not found in paradigm.", (const char*) kindname);
+			msg.Format(_T("Model kindname \"%s\" was not found in paradigm."), kindname);
 			MyMessageBox(msg, MB_OK | MB_ICONSTOP);
 		}
 
@@ -2841,7 +2841,7 @@
 		if(modelBuildFunctions->Lookup(kindname,fn))
 			return fn(iModel,aparent);
 
-		if(modelBuildFunctions->Lookup("*",fn))
+		if(modelBuildFunctions->Lookup(_T("*"),fn))
 			return fn(iModel,aparent);
 	}
 
@@ -2858,11 +2858,11 @@
 	}
 	while( !kindnames.IsEmpty() )
 	{
-		CString trash = kindnames.SpanIncluding(",;");
+		CString trash = kindnames.SpanIncluding(_T(",;"));
 		kindnames = kindnames.Mid(trash.GetLength());
 		if( kindnames.IsEmpty() )
 			break;
-		CString kindname = kindnames.SpanExcluding(",;");
+		CString kindname = kindnames.SpanExcluding(_T(",;"));
 		kindnames = kindnames.Mid(kindname.GetLength());
 		ASSERT(!kindname.IsEmpty());
 
@@ -2891,7 +2891,7 @@
 		if( atomkindnames.Find(kindname) == NULL )
 		{
 			CString msg;
-			msg.Format("Atom kindname \"%s\" was not found in paradigm.", (const char*) kindname);
+			msg.Format(_T("Atom kindname \"%s\" was not found in paradigm."), kindname);
 			MyMessageBox(msg, MB_OK | MB_ICONSTOP);
 		}
 
@@ -2900,7 +2900,7 @@
 		if(atomBuildFunctions->Lookup(kindname,fn))
 			return fn(iAtom,aparent);
 
-		if(atomBuildFunctions->Lookup("*",fn))
+		if(atomBuildFunctions->Lookup(_T("*"),fn))
 			return fn(iAtom,aparent);
 	}
 
@@ -2919,11 +2919,11 @@
 	}
 	while( !kindnames.IsEmpty() )
 	{
-		CString trash = kindnames.SpanIncluding(",;");
+		CString trash = kindnames.SpanIncluding(_T(",;"));
 		kindnames = kindnames.Mid(trash.GetLength());
 		if( kindnames.IsEmpty() )
 			break;
-		CString kindname = kindnames.SpanExcluding(",;");
+		CString kindname = kindnames.SpanExcluding(_T(",;"));
 		kindnames = kindnames.Mid(kindname.GetLength());
 		ASSERT(!kindname.IsEmpty());
 
@@ -2950,11 +2950,11 @@
 	}
 	while( !kindnames.IsEmpty() )
 	{
-		CString trash = kindnames.SpanIncluding(",;");
+		CString trash = kindnames.SpanIncluding(_T(",;"));
 		kindnames = kindnames.Mid(trash.GetLength());
 		if( kindnames.IsEmpty() )
 			break;
-		CString kindname = kindnames.SpanExcluding(",;");
+		CString kindname = kindnames.SpanExcluding(_T(",;"));
 		kindnames = kindnames.Mid(kindname.GetLength());
 		ASSERT(!kindname.IsEmpty());
 
@@ -2978,11 +2978,11 @@
 	}
 	while( !kindnames.IsEmpty() )
 	{
-		CString trash = kindnames.SpanIncluding(",;");
+		CString trash = kindnames.SpanIncluding(_T(",;"));
 		kindnames = kindnames.Mid(trash.GetLength());
 		if( kindnames.IsEmpty() )
 			break;
-		CString kindname = kindnames.SpanExcluding(",;");
+		CString kindname = kindnames.SpanExcluding(_T(",;"));
 		kindnames = kindnames.Mid(kindname.GetLength());
 		ASSERT(!kindname.IsEmpty());
 
@@ -3031,25 +3031,25 @@
 		if( refkindnames.Find(kindname) == NULL )
 		{
 			CString msg;
-			msg.Format("Ref kindname \"%s\" was not found in paradigm.", (const char*) kindname);
+			msg.Format(_T("Ref kindname \"%s\" was not found in paradigm."), kindname);
 			MyMessageBox(msg, MB_OK | MB_ICONSTOP);
 		}
 
 
 		CBuilderRefCreateFunction fn;
-		if(refBuildFunctions && (refBuildFunctions->Lookup(kindname,fn) || refBuildFunctions->Lookup("*",fn)))
+		if(refBuildFunctions && (refBuildFunctions->Lookup(kindname,fn) || refBuildFunctions->Lookup(_T("*"),fn)))
 			return fn(iRef,aparent);
 
 		if(ot == OBJTYPE_MODEL) {
 			CBuilderModelRefCreateFunction fn;
-			if(modelRefBuildFunctions && (modelRefBuildFunctions->Lookup(kindname,fn) || modelRefBuildFunctions->Lookup("*",fn))) {
+			if(modelRefBuildFunctions && (modelRefBuildFunctions->Lookup(kindname,fn) || modelRefBuildFunctions->Lookup(_T("*"),fn))) {
 				return fn(iRef,aparent);
 			}
 			return new CBuilderModelReference(iRef, aparent);
 		}
 		else if (ot == OBJTYPE_ATOM) {
 			CBuilderAtomRefCreateFunction fn;
-			if(atomRefBuildFunctions && (atomRefBuildFunctions->Lookup(kindname,fn) || atomRefBuildFunctions->Lookup("*",fn))) {
+			if(atomRefBuildFunctions && (atomRefBuildFunctions->Lookup(kindname,fn) || atomRefBuildFunctions->Lookup(_T("*"),fn))) {
 				return fn(iRef,aparent);
 			}
 			return new CBuilderAtomReference(iRef, aparent);
@@ -3069,11 +3069,11 @@
 	}
 	while( !kindnames.IsEmpty() )
 	{
-		CString trash = kindnames.SpanIncluding(",;");
+		CString trash = kindnames.SpanIncluding(_T(",;"));
 		kindnames = kindnames.Mid(trash.GetLength());
 		if( kindnames.IsEmpty() )
 			break;
-		CString kindname = kindnames.SpanExcluding(",;");
+		CString kindname = kindnames.SpanExcluding(_T(",;"));
 		kindnames = kindnames.Mid(kindname.GetLength());
 		ASSERT(!kindname.IsEmpty());
 
@@ -3102,7 +3102,7 @@
 		if( connectionkindnames.Find(kindname) == NULL )
 		{
 			CString msg;
-			msg.Format("Connection kindname \"%s\" was not found in paradigm.", (const char*) kindname);
+			msg.Format(_T("Connection kindname \"%s\" was not found in paradigm."), kindname);
 			MyMessageBox(msg, MB_OK | MB_ICONSTOP);
 		}
 
@@ -3111,7 +3111,7 @@
 		if(connectionBuildFunctions->Lookup(kindname,fn))
 			return fn(iConnection,aparent);
 
-		if(connectionBuildFunctions->Lookup("*",fn))
+		if(connectionBuildFunctions->Lookup(_T("*"),fn))
 			return fn(iConnection,aparent);
 	}
 
@@ -3132,11 +3132,11 @@
 	}
 	while( !kindnames.IsEmpty() )
 	{
-		CString trash = kindnames.SpanIncluding(",;");
+		CString trash = kindnames.SpanIncluding(_T(",;"));
 		kindnames = kindnames.Mid(trash.GetLength());
 		if( kindnames.IsEmpty() )
 			break;
-		CString kindname = kindnames.SpanExcluding(",;");
+		CString kindname = kindnames.SpanExcluding(_T(",;"));
 		kindnames = kindnames.Mid(kindname.GetLength());
 		ASSERT(!kindname.IsEmpty());
 
@@ -3165,7 +3165,7 @@
 		if( setkindnames.Find(kindname) == NULL )
 		{
 			CString msg;
-			msg.Format("Set kindname \"%s\" was not found in paradigm.", (const char*) kindname);
+			msg.Format(_T("Set kindname \"%s\" was not found in paradigm."), kindname);
 			MyMessageBox(msg, MB_OK | MB_ICONSTOP);
 		}
 
@@ -3174,7 +3174,7 @@
 		if(setBuildFunctions->Lookup(kindname,fn))
 			return fn(iSet,aparent);
 
-		if(setBuildFunctions->Lookup("*",fn))
+		if(setBuildFunctions->Lookup(_T("*"),fn))
 			return fn(iSet,aparent);
 	}
 
@@ -3245,7 +3245,7 @@
 			if( modelkindnames.Find(kindname) == NULL && kindname != "*" )
 			{
 				CString msg;
-				msg.Format("Model kindname \"%s\" was not found in paradigm.", (const char*) kindname);
+				msg.Format(_T("Model kindname \"%s\" was not found in paradigm."), kindname);
 				MyMessageBox(msg, MB_OK | MB_ICONSTOP);
 			}
 		}
@@ -3262,7 +3262,7 @@
 			if( atomkindnames.Find(kindname) == NULL && kindname != "*" )
 			{
 				CString msg;
-				msg.Format("Atom kindname \"%s\" was not found in paradigm.", (const char*) kindname);
+				msg.Format(_T("Atom kindname \"%s\" was not found in paradigm."), kindname);
 				MyMessageBox(msg, MB_OK | MB_ICONSTOP);
 			}
 		}
@@ -3281,7 +3281,7 @@
 				if( refkindnames.Find(kindname) == NULL && kindname != "*" )
 				{
 					CString msg;
-					msg.Format("ModelRef kindname \"%s\" was not found in paradigm.", (const char*) kindname);
+					msg.Format(_T("ModelRef kindname \"%s\" was not found in paradigm."), kindname);
 					MyMessageBox(msg, MB_OK | MB_ICONSTOP);
 				}
 			}
@@ -3298,7 +3298,7 @@
 				if( refkindnames.Find(kindname) == NULL && kindname != "*" )
 				{
 					CString msg;
-					msg.Format("AtomRef kindname \"%s\" was not found in paradigm.", (const char*) kindname);
+					msg.Format(_T("AtomRef kindname \"%s\" was not found in paradigm."), kindname);
 					MyMessageBox(msg, MB_OK | MB_ICONSTOP);
 				}
 			}

Modified: trunk/SDK/BON/Common/Builder.h
==============================================================================
--- trunk/SDK/BON/Common/Builder.h	Tue Apr 12 13:34:17 2011	(r1263)
+++ trunk/SDK/BON/Common/Builder.h	Tue Apr 12 14:48:33 2011	(r1264)
@@ -69,7 +69,7 @@
 typedef CMap<IUnknown*, IUnknown*, CBuilderConnection*, CBuilderConnection*> CBuilderConnectionLookupTable;
 typedef CMap<IUnknown*, IUnknown*, CBuilderReferencePort*, CBuilderReferencePort*> CBuilderReferencePortLookupTable;
 
-typedef CMap<CString, LPCSTR, CString, LPCSTR> CStringMap;
+typedef CMap<CString, LPCTSTR, CString, LPCTSTR> CStringMap;
 
 typedef CBuilderObject CBuilderAtomicObject;
 typedef CBuilderObjectList CBuilderAtomicObjectList;

Modified: trunk/SDK/BON/Common/ComponentObj.cpp
==============================================================================
--- trunk/SDK/BON/Common/ComponentObj.cpp	Tue Apr 12 13:34:17 2011	(r1263)
+++ trunk/SDK/BON/Common/ComponentObj.cpp	Tue Apr 12 14:48:33 2011	(r1264)
@@ -460,7 +460,7 @@
 			COMTHROW(project->AbortTransaction());
 			throw;
 		} catch(...) {
-			AfxMessageBox( "Unhandled and unknown exception was thrown in BON2Component Invoke!" );
+			AfxMessageBox(_T("Unhandled and unknown exception was thrown in BON2Component Invoke!"));
 			COMTHROW(project->AbortTransaction());
 			COMTHROW(E_FAIL);
 		}
@@ -652,7 +652,7 @@
 		pThis->HandleError( &ex );
 	}
 	catch ( ... ) {
-		AfxMessageBox( "Unhandled and unknown exception was thrown in BON2Component Invoke!" );
+		AfxMessageBox( _T("Unhandled and unknown exception was thrown in BON2Component Invoke!") );
 	}
 
 	return S_OK;
@@ -709,7 +709,7 @@
 		#endif
 	}
 	catch ( ... ) {
-		AfxMessageBox( "Unhandled and unknown exception was thrown in BON2Component InvokeEx!" );
+		AfxMessageBox( _T("Unhandled and unknown exception was thrown in BON2Component InvokeEx!") );
 		#ifndef BON_CUSTOM_TRANSACTIONS
 			COMTHROW( gme->AbortTransaction() );
 		#endif
@@ -759,7 +759,7 @@
 		COMTHROW( gme->AbortTransaction() );
 	}
 	catch ( ... ) {
-		AfxMessageBox( "Unhandled and unknown exception was thrown in BON2Component ObjectInvokeEx!" );
+		AfxMessageBox( _T("Unhandled and unknown exception was thrown in BON2Component ObjectInvokeEx!") );
 		COMTHROW( gme->AbortTransaction() );
 	}
 	} COMCATCH(;)
@@ -797,7 +797,7 @@
 			pThis->HandleError( &ex );
 		}
 		catch ( ... ) {
-			AfxMessageBox( "Unhandled and unknown exception was thrown in BON2Component Initialization!" );
+			AfxMessageBox( _T("Unhandled and unknown exception was thrown in BON2Component Initialization!") );
 		}
 
 		COMTHROW( p->CommitTransaction() );
@@ -958,7 +958,7 @@
 		sprintf_s( chBuffer, "%x", ( (BON::Exception*) pEx)->getHResult() );
 		strOut += "\nException hresult : " + std::string( chBuffer );
 	}
-	AfxMessageBox( strOut.c_str() );
+	AfxMessageBox( CString(strOut.c_str()) );
 }
 
 
@@ -1018,11 +1018,11 @@
 #ifndef PARADIGM_INDEPENDENT
 	while( !pars.IsEmpty() )
 	{
-		CString trash = pars.SpanIncluding(" ,;");
+		CString trash = pars.SpanIncluding(_T(" ,;"));
 		pars = pars.Mid(trash.GetLength());
 		if( pars.IsEmpty() )
 			break;
-		CString par = pars.SpanExcluding(" ,;");
+		CString par = pars.SpanExcluding(_T(" ,;"));
 		pars = pars.Mid(par.GetLength());
 		ASSERT(!par.IsEmpty());
 		paradigms.AddTail(par);

Modified: trunk/SDK/BON/Common/ComponentObj.h
==============================================================================
--- trunk/SDK/BON/Common/ComponentObj.h	Tue Apr 12 13:34:17 2011	(r1263)
+++ trunk/SDK/BON/Common/ComponentObj.h	Tue Apr 12 14:48:33 2011	(r1264)
@@ -160,7 +160,7 @@
 	bool interactive;
 
 #ifdef BUILDER_OBJECT_NETWORK
-	typedef CMap<CString, LPCSTR, CString, LPCSTR> CStringMap;
+	typedef CMap<CString, LPCTSTR, CString, LPCTSTR> CStringMap;
 	CStringMap parmap;
 #endif
 

Modified: trunk/SDK/BON/Common/Exceptions.h
==============================================================================
--- trunk/SDK/BON/Common/Exceptions.h	Tue Apr 12 13:34:17 2011	(r1263)
+++ trunk/SDK/BON/Common/Exceptions.h	Tue Apr 12 14:48:33 2011	(r1264)
@@ -42,7 +42,7 @@
 
 			BSTR bstr;
 			errorInfo->GetDescription(&bstr);
-			CString str( bstr );
+			CStringA str( bstr );
 			std::string strResult( str.GetBuffer( str.GetLength() ) );
 			str.ReleaseBuffer();
 			SysFreeString(bstr);

Modified: trunk/SDK/BON/Common/Extensions.cpp
==============================================================================
--- trunk/SDK/BON/Common/Extensions.cpp	Tue Apr 12 13:34:17 2011	(r1263)
+++ trunk/SDK/BON/Common/Extensions.cpp	Tue Apr 12 14:48:33 2011	(r1264)
@@ -36,7 +36,7 @@
 {
 	void splitKinds( const std::string& strKinds, std::vector<std::string>& vecKinds )
 	{
-		CString str( strKinds.c_str() );
+		CStringA str( strKinds.c_str() );
 		str.TrimLeft();
 		str.TrimRight();
 		if ( str.IsEmpty() )
@@ -49,7 +49,7 @@
 					str.ReleaseBuffer();
 					break;
 				}
-				CString str2 = str.Left( iPos );
+				CStringA str2 = str.Left( iPos );
 				vecKinds.push_back( str2.GetBuffer( str2.GetLength() ) );
 				str2.ReleaseBuffer();
 				str = str.Right( str.GetLength() - iPos );

Modified: trunk/SDK/BON/Common/Formatter.cpp
==============================================================================
--- trunk/SDK/BON/Common/Formatter.cpp	Tue Apr 12 13:34:17 2011	(r1263)
+++ trunk/SDK/BON/Common/Formatter.cpp	Tue Apr 12 14:48:33 2011	(r1264)
@@ -24,16 +24,16 @@
 		c+=100;
 
 		CString result;
-		result.Format("<a href=\"mga:id-%04X-%08X\">", c, p);
+		result.Format(_T("<a href=\"mga:id-%04X-%08X\">"), c, p);
 		result+= text;
-		result+="</a>";		
+		result+=_T("</a>");
 		return result;
 	}
 
 	CString Formatter::MakeColored(const CString & text, COLORREF color)
 	{
 		CString result;
-		result.Format("<font color=\"#%02X%02X%02X\"> %s </font>", (int)GetRValue(color), (int)GetGValue(color),(int)GetBValue(color), text);
+		result.Format(_T("<font color=\"#%02X%02X%02X\"> %s </font>"), (int)GetRValue(color), (int)GetGValue(color),(int)GetBValue(color), text);
 		return result;
 	}
 }

Modified: trunk/SDK/BON/Common/GMECOM.H
==============================================================================
--- trunk/SDK/BON/Common/GMECOM.H	Tue Apr 12 13:34:17 2011	(r1263)
+++ trunk/SDK/BON/Common/GMECOM.H	Tue Apr 12 14:48:33 2011	(r1264)
@@ -3,15 +3,6 @@
 
 #include "ComponentLib.h"
 
-// TODO: remove it or replace it with SmartMultiPtr from CommonMgaTrukk.h
-template <class TTT>
-class COMArray {
-public:
-	CComPtr<TTT> *array;
-	COMArray(long len)  { array = new CComPtr<TTT>[len]; };
-	~COMArray() { delete[] array; };
-};
-
 #define COM_EQUAL(a, b) (static_cast<IUnknown *>(a) == b ? true : a.IsEqualObject(b))
 
 // from CommonMgaTrukk.h

Modified: trunk/SDK/BON/Common/Utils.cpp
==============================================================================
--- trunk/SDK/BON/Common/Utils.cpp	Tue Apr 12 13:34:17 2011	(r1263)
+++ trunk/SDK/BON/Common/Utils.cpp	Tue Apr 12 14:48:33 2011	(r1264)
@@ -38,12 +38,17 @@
 
 	std::string	Copy( const CComBSTR& bstr )
 	{
-		CString str( bstr );
+		CStringA str( bstr );
 		std::string strResult( str.GetBuffer( str.GetLength() ) );
 		str.ReleaseBuffer();
 		return strResult;
 	}
 
+	std::wstring CopyW( const CComBSTR& bstr )
+	{
+		return std::wstring(static_cast<const wchar_t*>(bstr));
+	}
+
 //###############################################################################################################################################
 //
 // 	C L A S S :  Util::Variant

Modified: trunk/SDK/BON/Common/Utils.h
==============================================================================
--- trunk/SDK/BON/Common/Utils.h	Tue Apr 12 13:34:17 2011	(r1263)
+++ trunk/SDK/BON/Common/Utils.h	Tue Apr 12 14:48:33 2011	(r1264)
@@ -45,6 +45,7 @@
 
 	CComBSTR	Copy( const std::string& str );
 	std::string	Copy( const CComBSTR& bstr );
+	std::wstring CopyW( const CComBSTR& bstr );
 
 //###############################################################################################################################################
 //

Modified: trunk/SDK/BON/Wizard/Templates/1033/ComponentConfig.h
==============================================================================
--- trunk/SDK/BON/Wizard/Templates/1033/ComponentConfig.h	Tue Apr 12 13:34:17 2011	(r1263)
+++ trunk/SDK/BON/Wizard/Templates/1033/ComponentConfig.h	Tue Apr 12 14:48:33 2011	(r1264)
@@ -36,11 +36,11 @@
 
 
 // This name will appear in the popup window for interpreter selection.
-#define COMPONENT_NAME "[!output COMPONENT_NAME]"
+#define COMPONENT_NAME _T("[!output COMPONENT_NAME]")
 
 
 // This text will appear in the toolbar icon tooltip and in the menu.
-#define TOOLTIP_TEXT "[!output TOOLTIP_TEXT]"
+#define TOOLTIP_TEXT _T("[!output TOOLTIP_TEXT]")
 
 // This macro determines the component type (addon vs. interpreter):
 [!if GME_INTERPRETER]
@@ -56,7 +56,7 @@
 [!if PARADIGM_INDEPENDENT]
 #define PARADIGM_INDEPENDENT
 [!else]
-#define PARADIGMS "[!output PARADIGMS]"
+#define PARADIGMS _T("[!output PARADIGMS]")
 [!endif]
 
 

Modified: trunk/SDK/BON/Wizard/Templates/1033/RawComponent.cpp
==============================================================================
--- trunk/SDK/BON/Wizard/Templates/1033/RawComponent.cpp	Tue Apr 12 13:34:17 2011	(r1263)
+++ trunk/SDK/BON/Wizard/Templates/1033/RawComponent.cpp	Tue Apr 12 14:48:33 2011	(r1264)
@@ -27,7 +27,7 @@
 	return InvokeEx(gme, focus, selected, parvar);
 #else
 	if(interactive) {
-		AfxMessageBox("This component does not support the obsolete invoke mechanism");
+		AfxMessageBox(_T("This component does not support the obsolete invoke mechanism"));
 	}
 	return E_MGA_NOT_SUPPORTED;
 #endif
@@ -50,10 +50,10 @@
 			if(currentobj) COMTHROW(currentobj->get_Name(&focusname));
 			using namespace GMEConsole;
 			Console::Out::WriteLine("Interpreter started...");
-			AfxMessageBox("RAW Com Component --- Plugin!!!! Sample (project: " + CString(projname) +
-						", focus: " + CString(focusname));
+			AfxMessageBox(_T("RAW Com Component --- Plugin!!!! Sample (project: ") + CString(projname) +
+						_T(", focus: ") + CString(focusname));
 			COMTHROW(project->CommitTransaction());
-			Console::Out::WriteLine("Interpreter completed...");
+			Console::Out::WriteLine(_T("Interpreter completed..."));
 		}	catch(...) { project->AbortTransaction(); throw; }
 		
 	  } 
@@ -64,7 +64,7 @@
 // you only need to implement it if other invokation mechanisms are used
 STDMETHODIMP RawComponent::ObjectsInvokeEx( IMgaProject *project,  IMgaObject *currentobj,  IMgaObjects *selectedobjs,  long param) {
 	if(interactive) {
-		AfxMessageBox("Tho ObjectsInvoke method is not implemented");
+		AfxMessageBox(_T("The ObjectsInvoke method is not implemented"));
 	}
 	return E_MGA_NOT_SUPPORTED;
 }
@@ -85,7 +85,7 @@
 // these two functions are the main 
 STDMETHODIMP RawComponent::GlobalEvent(globalevent_enum event) { 
 	if(event == GLOBALEVENT_UNDO) {
-		AfxMessageBox("UNDO!!");
+		AfxMessageBox(_T("UNDO!!"));
 	}
 	return S_OK; 
 }
@@ -94,7 +94,7 @@
 	if(eventmask & OBJEVENT_CREATED) {
 		CComBSTR objID;
 		COMTHROW(obj->get_ID(&objID));
-		AfxMessageBox( "Object created! ObjID: " + CString(objID)); 
+		AfxMessageBox(_T("Object created! ObjID: ") + CString(objID)); 
 	}		
 	return S_OK;
 }


More information about the gme-commit mailing list