CAFE

vb6 api

GetAcp

작성자올란도|작성시간09.01.29|조회수298 목록 댓글 0

Private Declare Function GetACP Lib "kernel32" () As Long
Private Declare Function GetCPInfo Lib "kernel32" (ByVal CodePage As Long, _
        lpCPInfo As CPINFO) As Long
       
Const CP_ACP = 0
Const MAX_DEFAULTCHAR = 2
Const MAX_LEADBYTES = 12  '  5 ranges, 2 bytes ea., 0 term.

Private Type CPINFO
        MaxCharSize As Long                    '  max length (Byte) of a char
        DefaultChar(MAX_DEFAULTCHAR) As Byte   '  default character
        LeadByte(MAX_LEADBYTES) As Byte        '  lead byte ranges
End Type
Dim Cpage As Long

Private Sub CmdACP_Click()

    Cpage = GetACP()
   
    MsgBox "현재 시스템의 ANSI 코드 페이지 ID : " & Cpage
   
   
End Sub

Private Sub CmdCPinfo_Click()

    Dim lcp As CPINFO
   
    Rtn = GetCPInfo(Cpage, lcp)
    MsgBox "MaxCharSize : " & lcp.MaxCharSize & Chr(13) & _
           "DefaultChar(0) : " & lcp.DefaultChar(0) & Chr(13) & _
           "LeadByte(0) : " & lcp.LeadByte(0)
                     
End Sub

Private Sub CmdExit_Click()
    End
End Sub

다음검색
현재 게시글 추가 기능 열기

댓글

댓글 리스트
맨위로

카페 검색

카페 검색어 입력폼