Private Declare Function LCMapString lib "kernel32" Alias "LCMapStringA" ( _
ByVal Locale As Long,_
ByVal DWMapFlags As Long,_
ByVal lpSrcStr As String,_
ByVal cchSrc As Long,_
ByVal lpDestStr As String,_
ByVal cchDest As Long) As Long
Private Declare Function lstrlen lib "kernel32" Alias "lstrlenA" (ByVal lpString As String) As Long
Function ConvertChineseSimplifIEdOrTraditional(ByVal strSrc As String,ByVal bSimplifIEd As Boolean) As String
Dim lngSrcLen As Long
Dim strBuffer As String
lngSrcLen = lstrlen(strSrc)
If lngSrcLen = 0 Then Exit Function
strBuffer = Space(lngSrcLen)
If bSimplifIEd Then '转换为简体
LCMapString &H804,&H2000000,strSrc,lngSrcLen,strBuffer,lngSrcLen
Else
LCMapString &H804,&H4000000,lngSrcLen
End If
ConvertChineseSimplifIEdOrTraditional = strBuffer
End Function
以上是内存溢出为你收集整理的VB6用API实现繁体简体转换全部内容,希望文章能够帮你解决VB6用API实现繁体简体转换所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)