ini_lang.h
上传用户:looem2003
上传日期:2014-07-20
资源大小:13733k
文件大小:1k
- #pragma once
- #include <windows.h>
- #include <tchar.h>
- #include <io.h>
- #include <stdio.h>
- #include <stdlib.h>
- #ifndef LONG_PATH
- #define LONG_PATH (_MAX_DRIVE+_MAX_DIR+_MAX_FNAME+_MAX_EXT)
- #endif
- #define LANGUAGE_NAME_LEN 85
- typedef struct _tagLangModule
- {
- TCHAR langFile[LONG_PATH];
- TCHAR lang[LANGUAGE_NAME_LEN];
- TCHAR langName[LANGUAGE_NAME_LEN];
- }LANG_MODULE,*LPLANG_MODULE;
- class LangModule
- {
- public:
- LangModule();
- ~LangModule();
- BOOL init_lang( IN LPCTSTR langFile, IN LPCTSTR lang );
- BOOL is_hex( IN LPCTSTR str );
- void hex_to_str( IN LPCTSTR str, OUT LPTSTR outStr, IN size_t oStrSize );
- LPCTSTR _lss( IN DWORD keyID, OUT LPTSTR dest, IN size_t szStr, ...);
- LPCTSTR _ls( IN DWORD keyID, ...);
- static TCHAR str[4096];
- LPCTSTR get_current_lang();
- LPCTSTR get_current_lang_name();
- BOOL get_lang_from_file( DWORD index, LPTSTR lang, DWORD langSize, LPTSTR langName, DWORD langNameSize );
- private:
- TCHAR tmp[4096];
- TCHAR key[124];
- LANG_MODULE lm;
- };
- extern LangModule lm;