⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lang.h

📁 GPS坐标转换软件与源程序 支持世界上大多数坐标框架下
💻 H
字号:
//this file is for language switch
//This program is free software; you can redistribute it and/or
//modify it under the terms of the GNU General Public License
//as published by the Free Software Foundation; either
//version 2 of the License, or (at your option) any later version.
//
//This program is distributed in the hope that it will be useful,
//but WITHOUT ANY WARRANTY; without even the implied warranty of
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	See the
//GNU General Public License for more details.
//
//You should have received a copy of the GNU General Public License
//along with this program; if not, write to the Free Software
//Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

#include "langids.h"
///////////////////////////////////////////////////////////////////////////////
// Resource strings
//
#ifdef USE_STRING_IDS
#define	RESSTRIDTYPE		LPCTSTR
#define	IDS2RESIDTYPE(id)	#id
#define GetResString(id)	_GetResString(#id)
CString _GetResString(RESSTRIDTYPE StringID);
#else//USE_STRING_IDS
#define	RESSTRIDTYPE		UINT
#define	IDS2RESIDTYPE(id)	id
CString GetResString(RESSTRIDTYPE StringID);
#define _GetResString(id)	GetResString(id)
#endif//!USE_STRING_IDS
//void InitThreadLocale();
#ifndef _READLINE_FROM_FILE_POINTER_
#define _READLINE_FROM_FILE_POINTER_
i4 ReadLine(FILE *fp, char* s);
#endif


enum eDefaultDirectory{
	EXECUTABLEDIR = 0,
	TEMPDIR = 1,
	INCOMINGDIR = 2,
	LOGDIR = 3,
	INSTALLLANGDIR = 4, // directories with languages installed 
	USERLANGDIR = 5, // directories with languages installed by the user or installer 
	WEBSERVERDIR = 6,
	SKINDIR = 7,
	DATABASEDIR = 8, // the parent directory of the incoming/temp folder
	CONFIGBASEDIR = 9, // the parent directory of the config folder 
	CONFIGDIR = 10, // assumed to be not writeable (!)
	TOOLBARDIR = 11,
	EXPANSIONDIR = 12, // this is a base directory accessable for all users for things eMule installs
	UPDATEDIR = 13	//
};

class CLang
{
public:
	//0:zhCN,1:En
	static	WORD	m_wLanguageID;
	static	CString m_strLangDir;
	static	CString	m_astrDefaultDirs[14];	//Added by thilon on 2007.05.28	

public:
	static	void	Init();
	static	void	Uninit();
	static	WORD	GetLanguageID();
	static	void	SetLanguageID(WORD lid);
	static	void	GetLanguages(CWordArray& aLanguageIDs);
	static	void	SetLanguage();
	static	const CString& GetLangDir()					{return m_strLangDir;}
	static	bool	IsLanguageSupported(LANGID lidSelected, bool bUpdateBefore);
	static	CString GetLangDLLNameByID(LANGID lidSelected);
	static void		SetDirectory(eDefaultDirectory eDirectory, CString strNewDir);
//	static	void	InitThreadLocale();
//	static	void	SetRtlLocale(LCID lcid);
//	static	CString GetHtmlCharset();

	
//	static	bool	m_abDefaultDirsCreated[14];
//	static	int		m_nCurrentUserDirMode; // Only for PPgTweaks
	//Get directory,if eDirectory=-1,
	static CString	GetDirectory(eDefaultDirectory eDirectory, bool bCreate = true);
	static CString	GetDefaultDirectory(eDefaultDirectory eDirectory, bool bCreate);
};

/*The extern keyword declares a variable or function and specifies that it has external 
linkage (its name is visible from files other than the one in which it's defined). 
When modifying a variable, extern specifies that the variable has static duration 
(it is allocated when the program begins and deallocated when the program ends). 
The variable or function may be defined in another source file, or later in the same file.
Declarations of variables and functions at file scope are external by default.
*/
extern CLang theLang;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -