www.pudn.com > GOS.rar > GFont.h


#ifndef __GUI_FONT_H__ 
#define __GUI_FONT_H__ 
 
extern const FONT acFont8x16; 
extern const FONT acHZK16x16; 
const TCHAR strChars[]="¡ã£¤£¥¡æ¨H¡ë¡À£«£­¡Á¡Â£¯£¬¡££»¡¢£¿£º¡°¡±¡®¡¯¡¶¡·"; 
inline int GUI_CHARCODE(LPCTSTR str)  
{ 
	int c1=(BYTE)*str; 
	int c2=(BYTE)*(str+1); 
	if(c1>0xa0 && c2>0xa0) 
	{ 
		c1=(c1-0xa1)*94+(c2-0xa1); 
		if(c1<1410) 
		{ 
			LPCTSTR s; 
			s=strChars; 
			while(*s) 
			{ 
				if(*s==*str && *(s+1)==*(str+1)) 
				{ 
					c1=5165+(s-strChars)/2; 
					break; 
				} 
				s+=2; 
			} 
			if(!*s)c1=256; 
		} 
	} 
	return c1; 
} 
 
 
#endif /*__GUI_FONT_H__*/