Index: src/libictranslate/ResourceManager.cpp =================================================================== diff -u -rc04cbdd0e391ca357bd9b2a24ce8de3231bf3871 -r3f9f8af037199406b260eee3f6acb5cd6a588960 --- src/libictranslate/ResourceManager.cpp (.../ResourceManager.cpp) (revision c04cbdd0e391ca357bd9b2a24ce8de3231bf3871) +++ src/libictranslate/ResourceManager.cpp (.../ResourceManager.cpp) (revision 3f9f8af037199406b260eee3f6acb5cd6a588960) @@ -34,6 +34,8 @@ #define EMPTY_STRING _t("") +CResourceManager CResourceManager::S_ResourceManager; + CFormat::CFormat(const tchar_t* pszFormat) : m_strText(pszFormat) { @@ -852,6 +854,11 @@ DeleteCriticalSection(&m_cs); } +CResourceManager& CResourceManager::Acquire() +{ + return CResourceManager::S_ResourceManager; +} + void CResourceManager::Init(HMODULE hrc) { m_hRes=hrc; Index: src/libictranslate/ResourceManager.h =================================================================== diff -u -rc04cbdd0e391ca357bd9b2a24ce8de3231bf3871 -r3f9f8af037199406b260eee3f6acb5cd6a588960 --- src/libictranslate/ResourceManager.h (.../ResourceManager.h) (revision c04cbdd0e391ca357bd9b2a24ce8de3231bf3871) +++ src/libictranslate/ResourceManager.h (.../ResourceManager.h) (revision 3f9f8af037199406b260eee3f6acb5cd6a588960) @@ -182,10 +182,13 @@ class LIBICTRANSLATE_API CResourceManager { -public: +protected: CResourceManager(); ~CResourceManager(); +public: + static CResourceManager& Acquire(); + void Init(HMODULE hrc); void SetCallback(PFNNOTIFYCALLBACK pfn) { m_pfnCallback=pfn; }; @@ -221,6 +224,9 @@ PFNNOTIFYCALLBACK m_pfnCallback; // UINT m_uiMsg; CRITICAL_SECTION m_cs; + +protected: + static CResourceManager S_ResourceManager; }; END_ICTRANSLATE_NAMESPACE