示例#1
0
文件: langx.cpp 项目: arksoftgit/10c
HRESULT STDMETHODCALLTYPE CLanguageX::put_EscapeChar(BSTR strVal)
{
   LPTSTR psz = BSTR2TSTR( strVal );
   m_cmLang.chEscape = *psz;
   delete [] psz;
   return S_OK;
}
示例#2
0
文件: langx.cpp 项目: arksoftgit/10c
HRESULT STDMETHODCALLTYPE CLanguageX::put_TerminatorChar(BSTR strVal)
{
   LPTSTR psz = BSTR2TSTR( strVal );
   m_cmLang.chTerminator = *psz;
   delete [] psz;
   return S_OK;
}
示例#3
0
HRESULT STDMETHODCALLTYPE CHotKeyX::put_VirtKey2( BSTR strKey )
{
	LPTSTR psz = BSTR2TSTR( strKey );
	m_cmHotKey.nVirtKey2 = *psz;
	delete psz;
	return S_OK;
}
示例#4
0
文件: globalsx.cpp 项目: DeegC/10d
HRESULT STDMETHODCALLTYPE CGlobalsX::UnregisterLanguage( BSTR strName )
{
   LPTSTR psz = BSTR2TSTR( strName );
   HRESULT hr = CME2HRESULT( CMUnregisterLanguage( psz ) );
   delete [] psz;
   return hr;
}
示例#5
0
文件: globalsx.cpp 项目: DeegC/10d
HRESULT STDMETHODCALLTYPE CGlobalsX::put_ReplaceMRUList( BSTR strMRUList )
{
   LPTSTR psz = BSTR2TSTR( strMRUList );
   CMSetFindReplaceMRUList( psz, FALSE );
   delete [] psz;
   return S_OK;
}
示例#6
0
HRESULT STDMETHODCALLTYPE CHotKeyX::put_VirtKey2( BSTR strKey )
{
   LPTSTR psz = BSTR2TSTR( strKey );
#ifdef _UNICODE
   m_cmHotKey.nVirtKey2 = (unsigned wchar_t)*psz;
#else
   m_cmHotKey.nVirtKey2 = (unsigned char)*psz;
#endif
   delete [] psz;
   return S_OK;
}
示例#7
0
文件: globalsx.cpp 项目: DeegC/10d
HRESULT STDMETHODCALLTYPE CGlobalsX::RegisterLanguage( BSTR strName, ILanguage __RPC_FAR *pLang )
{
   HRESULT hr = S_FALSE;
   if ( pLang )
   {
      CM_LANGUAGE *pcmLang = pLang ? &( ( ( CLanguageX * ) pLang )->m_cmLang ) : NULL;
      LPTSTR psz = BSTR2TSTR( strName );
      hr = CME2HRESULT( CMRegisterLanguage( psz, pcmLang ) );
      delete [] psz;
   }

   return hr;
}
示例#8
0
// InsertItem ---------------------------------------------------------------
STDMETHODIMP CICodeList::InsertItem( long lIndex, BSTR strAdd,
                            VARIANT ImageIndex, VARIANT ItemData,
                            long* plIndex )
{
   ASSERT( m_pCtrl != NULL && ::IsWindow( m_pCtrl->m_hWnd ) );
   if( !::IsWindow( m_pCtrl->GetSafeHwnd() ) )
      return E_POINTER;

   long lIcon = 0, lParam = 0;

   // Image index is optional...
   if( !IS_VT_EMPTY( ImageIndex ) )
   {
      HRESULT hR = ::VariantChangeType( &ImageIndex, &ImageIndex, 0, VT_I4 );

      if( SUCCEEDED( hR ) )
         lIcon = ImageIndex.lVal;
   }

   // Item data is optional...
   if( !IS_VT_EMPTY( ItemData ) )
   {
      HRESULT hR = ::VariantChangeType( &ItemData, &ItemData, 0, VT_I4 );

      if( SUCCEEDED( hR ) )
         lParam = ItemData.lVal;
   }

   // Convert string
   LPTSTR psz = BSTR2TSTR( strAdd );

   if( NULL == psz )
      return E_OUTOFMEMORY;

   // Add to list view control
   int iItem = m_pCtrl->InsertItem( lIndex, psz, lIcon, lParam );

   if( plIndex )
      *plIndex = iItem;

   delete [] psz;

   return S_OK;
}
示例#9
0
文件: langx.cpp 项目: arksoftgit/10c
HRESULT STDMETHODCALLTYPE CLanguageX::put_Operators(BSTR strVal)
{
   delete ( void * ) m_cmLang.pszOperators;
   m_cmLang.pszOperators = BSTR2TSTR( strVal );
   return S_OK;
}
示例#10
0
文件: langx.cpp 项目: arksoftgit/10c
HRESULT STDMETHODCALLTYPE CLanguageX::put_Keywords(BSTR strVal)
{
   delete ( void * ) m_cmLang.pszKeywords;
   m_cmLang.pszKeywords = BSTR2TSTR( strVal );
   return S_OK;
}
示例#11
0
文件: langx.cpp 项目: arksoftgit/10c
HRESULT STDMETHODCALLTYPE CLanguageX::put_TagEntities(BSTR strVal)
{
   delete ( void * ) m_cmLang.pszTagEntities;
   m_cmLang.pszTagEntities = BSTR2TSTR( strVal );
   return S_OK;
}
示例#12
0
文件: langx.cpp 项目: arksoftgit/10c
HRESULT STDMETHODCALLTYPE CLanguageX::put_StringDelims(BSTR strVal)
{
   delete ( void * ) m_cmLang.pszStringDelims;
   m_cmLang.pszStringDelims = BSTR2TSTR( strVal );
   return S_OK;
}
示例#13
0
文件: langx.cpp 项目: arksoftgit/10c
HRESULT STDMETHODCALLTYPE CLanguageX::put_ScopeKeywords2(BSTR strVal)
{
   delete ( void * ) m_cmLang.pszScopeKeywords2;
   m_cmLang.pszScopeKeywords2 = BSTR2TSTR( strVal );
   return S_OK;
}
示例#14
0
文件: langx.cpp 项目: arksoftgit/10c
HRESULT STDMETHODCALLTYPE CLanguageX::put_MultiLineComments2(BSTR strVal)
{
   delete ( void * ) m_cmLang.pszMultiLineComments2;
   m_cmLang.pszMultiLineComments2 = BSTR2TSTR( strVal );
   return S_OK;
}
示例#15
0
文件: langx.cpp 项目: arksoftgit/10c
HRESULT STDMETHODCALLTYPE CLanguageX::put_SingleLineComments(BSTR strVal)
{
   delete ( void * ) m_cmLang.pszSingleLineComments;
   m_cmLang.pszSingleLineComments = BSTR2TSTR( strVal );
   return S_OK;
}