Localize.h

Go to the documentation of this file.
00001 // KB  12/16/2004  \Include\Localize.h
00002 
00003 inline BOOL SetAppLocalizationDLL(HINSTANCE hinstance)
00004 {
00005    HINSTANCE hlangdll;
00006    char exename[512];
00007    CString dllname;
00008 
00009    GetModuleFileName( hinstance, exename, 512 );
00010 
00011    char *ptr;
00012    if (ptr = strrchr( exename, '.' ))
00013       *ptr = '\0';
00014 
00015    dllname = exename;
00016    dllname += ".lng";
00017 
00018    if (hlangdll = LoadLibrary(dllname)) {
00019       AfxSetResourceHandle(hlangdll);      
00020       return TRUE;
00021    }
00022 
00023    return FALSE;
00024 }
00025 
00026 
00027 // Niels 10/5/2003: remove the AFX_EXTENSION_MODULE reference so Hxt plugins can be compiled without 
00028 // reference to MFC
00029 
00030 //inline BOOL SetExtensionLocalizationDLL(AFX_EXTENSION_MODULE &dll)
00031 
00032 inline BOOL SetExtensionLocalizationDLL(HMODULE hModule, HMODULE& hResource)
00033 {
00034    HINSTANCE hlangdll;
00035    char exename[512];
00036    CString dllname;
00037 
00038    GetModuleFileName( hModule, exename, 512 );
00039 
00040    char *ptr = strrchr( exename, '.' );
00041    if (ptr)
00042       *ptr = '\0';
00043 
00044    dllname = exename;
00045    dllname += ".lng";
00046 
00047    hlangdll = LoadLibrary(dllname);
00048    
00049    if (hlangdll) {
00050       hResource = hlangdll;
00051      return TRUE;
00052    }
00053 
00054    return FALSE;
00055 }
00056 
00057 void InitStaticsLocalization();

This A:M SDK v12.0 documentation is maintained by Hash Inc. Please address any comments concerning this documentation to AMReports. If you have any information, knowledge, or documentation to share with the A:M developer community, please post them on the Hash SDK forum.

Generated on Thu Oct 27 11:46:44 2005 with doxygen 1.4.5 written by Dimitri van Heesch, © 1997-2001