Language.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. // Language.h: interface for the CLanguage class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_LANGUAGE_H__1FDF1B00_315B_49BB_BB9D_B4B82ED592DE__INCLUDED_)
  5. #define AFX_LANGUAGE_H__1FDF1B00_315B_49BB_BB9D_B4B82ED592DE__INCLUDED_
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. class EXPORT_CLASS CLanguage
  10. {
  11. typedef int Def_Translate(const char* pOrg, char* pRtn, int nSize);
  12. typedef void Def_Init(HWND hMainFrame);
  13. typedef void Def_Free();
  14. public:
  15. virtual ~CLanguage();
  16. static BOOL LoadDll();
  17. static void FreeDll();
  18. static CString GetCurLanguage(CString strOrigTxt);
  19. static void InitLanguage(HWND hWnd);
  20. static void FreeLanguage();
  21. static int ShowMessageBox(LPCTSTR lpszText, UINT nType = MB_OK, UINT nIDHelp = 0);
  22. static int ShowMessageBoxEx(LPCTSTR lpszText, UINT nType = MB_OK, UINT nIDHelp = 0);
  23. static int ShowMessageBox(UINT nIDPrompt, UINT nType = MB_OK, UINT nIDHelp = (UINT)-1);
  24. protected:
  25. CLanguage();
  26. static CLanguage m_self;
  27. CMapStringToString m_mapWords;
  28. HMODULE m_hDll;
  29. Def_Translate* m_pfTranslate;
  30. Def_Init* m_pfInit;
  31. Def_Free* m_pfFree;
  32. };
  33. #endif // !defined(AFX_LANGUAGE_H__1FDF1B00_315B_49BB_BB9D_B4B82ED592DE__INCLUDED_)