home *** CD-ROM | disk | FTP | other *** search
/ Dan Appleman's Visual Bas…s Guide to the Win32 API / Dan.Applmans.Visual.Basic.5.0.Programmers.Guide.To.The.Win32.API.1997.Ziff-Davis.Press.CD / VB5PG32.mdf / classlib / desaware / dwcpinfo.cls < prev    next >
Encoding:
Text File  |  1996-02-18  |  1.3 KB  |  56 lines

  1. VERSION 1.0 CLASS
  2. BEGIN
  3.   MultiUse = -1  'True
  4. END
  5. Attribute VB_Name = "dwCPInfo"
  6. Attribute VB_Creatable = True
  7. Attribute VB_Exposed = True
  8. Option Explicit
  9.  
  10. ' Class dwCPInfo
  11. ' Desaware API Class library
  12. ' Copyright (c) 1996 by Desaware Inc.
  13. ' All rights reserved
  14.  
  15.  
  16. #If Win32 Then
  17. Private iCPInfo As CPINFO
  18.  
  19. Public Sub CopyToCPINFO(ByVal lpCPInfo As Long)
  20.         
  21.     If lpCPInfo = 0 Then RaiseError 5, "dwCPInfo"
  22.     agCopyData iCPInfo, ByVal lpCPInfo, LenB(iCPInfo)
  23. End Sub
  24.  
  25. Public Sub CopyFromCPINFO(ByVal lpCPInfo As Long)
  26.         
  27.     If lpCPInfo = 0 Then RaiseError 5, "dwCPInfo"
  28.     agCopyData ByVal lpCPInfo, iCPInfo, LenB(iCPInfo)
  29. End Sub
  30.  
  31. Public Property Get MaxCharSize() As Long
  32.     MaxCharSize = iCPInfo.MaxCharSize
  33. End Property
  34.  
  35. Public Property Let MaxCharSize(vNewValue As Long)
  36.     iCPInfo.MaxCharSize = vNewValue
  37. End Property
  38.  
  39. Public Property Get DefaultChar(i As Integer) As Byte
  40.     DefaultChar = iCPInfo.DefaultChar(i)
  41. End Property
  42.  
  43. Public Property Let DefaultChar(i As Integer, vNewValue As Byte)
  44.     iCPInfo.DefaultChar(i) = vNewValue
  45. End Property
  46.  
  47. Public Property Get LeadByte(i As Integer) As Byte
  48.     LeadByte = iCPInfo.LeadByte(i)
  49. End Property
  50.  
  51. Public Property Let LeadByte(i As Integer, vNewValue As Byte)
  52.     iCPInfo.LeadByte(i) = vNewValue
  53. End Property
  54.  
  55. #End If ' this class only exists in win32
  56.