Cisco Cisco Computer Telephony Integration Option 9.0 Developer's Guide

Page of 35
CTI OS Internationalization Toolkit 
 
25 of 35 
6.2.3 Localizing a C++ and COM Application  
 
1.  In your C++ project import the “Cisco CTI OS IntlResourceLoader 1.0” type library: 
 
 
 
 
 
// IntResKitSample.h : Declaration of the CIntResKitSample 
 
#import "D:\CTIOSDEV\Com\IntlResourceLoader.dll" 
using namespace 
INTLRESOURCELOADERLib; 
 
const long CTIOS_AGENTPHONE_APPNAME = 0x702A; 
const long CTIOS_AGENTPHONE_PHONELOADING = 0x702B; 
2.  Create an instance of a CTI OS Internationalization Resource Loader: 
 
 
 
 
 
 
 
 
 
 
//////////////////////////////////////////////////////////////////////
/////// 
// CIntResKitSample 
class CIntResKitSample :  
 public 
CAxDialogImpl<CIntResKitSample> 

 
private: 
    IGetLanguagePtr m_IntKit; 
 
public: 
   CIntResKitSample() 
   { 
 
HRESULT hr =  
m_IntKit.CreateInstance(OLESTR("IntlResourceLoader.GetLanguage")); 
   } 
 
   BEGIN_MSG_MAP(CIntResKitSample) 
 MESSAGE_HANDLER(WM_INITDIALOG, 
OnInitDialog) 
 COMMAND_ID_HANDLER(IDOK, 
OnEnglishClicked) 
 COMMAND_ID_HANDLER(IDCANCEL, 
OnCancel) 
   END_MSG_MAP() 
 
3.  Set the language code for the language library to load : 
 
 
 
LRESULT CIntResKitSample::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM 
lParam, BOOL&  bHandled){ 
 _bstr_t bstrText = OLESTR(""); 
 //Sets the code for Mexican Spanish and Loads the Library  
 m_IntKit->PutLanguageID(0x80a);
 
Cisco Systems, Inc.