首页 > 代码库 > MFC开发常用的一些函数

MFC开发常用的一些函数

一、半角和全角字符的转换

           int LCMapString( 

                 LCID Locale             // locale identifier  

                DWORD dwMapFlags,  // mapping transformation type  

                LPCTSTR lpSrcStr,  // source string  

                int cchSrc,        // number of characters in source string  

                LPTSTR lpDestStr,  // destination buffer  

                int cchDest       // size of destination buffer);

主要参数说明

1、MAKELANGID(LANG_NEUTRAL,SUBLANG_SYS_DEFAULT);

2、常用的转换参数是:

LCMAP_FULLWIDTHUses wide characters (where applicable).
LCMAP_HALFWIDTH

Uses narrow characters (where applicable).

LCMAP_UPPERCASE
Uses uppercase.
LCMAP_LOWERCASE
Uses lowercase.


MFC开发常用的一些函数