home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 5_2007-2008.ISO / data / Zips / EXCEL_like2080408212007.psc / flexgrid / menu / cMemDC.cls < prev   
Text File  |  2003-11-19  |  8KB  |  98 lines

  1. VERSION 1.0 CLASS
  2. BEGIN
  3.   MultiUse = -1  'True
  4.   Persistable = 0  'NotPersistable
  5.   DataBindingBehavior = 0  'vbNone
  6.   DataSourceBehavior  = 0  'vbNone
  7.   MTSTransactionMode  = 0  'NotAnMTSObject
  8. END
  9. Attribute VB_Name = "cMemDC"
  10. Attribute VB_GlobalNameSpace = False
  11. Attribute VB_Creatable = True
  12. Attribute VB_PredeclaredId = False
  13. Attribute VB_Exposed = False
  14. '=========================================================================
  15. '
  16. '   You are free to use this source as long as this copyright message
  17. '     appears on your program's "About" dialog:
  18. '
  19. '   Outlook Bar Project
  20. '   Copyright (c) 2002 Vlad Vissoultchev (wqw@myrealbox.com)
  21. '
  22. '=========================================================================
  23. Option Explicit
  24.  
  25. '=========================================================================
  26. ' Public enums
  27. '=========================================================================
  28.  
  29. Public Enum UcsBackStyles
  30.     BS_TRANSPARENT = 1          ' Draws transparent background.
  31.     BS_OPAQUE = 2               ' Draws opaque background.
  32.     BS_NEWTRANSPARENT = 3       ' NT4: Uses chroma-keying upon BitBlt. Undocumented feature that is not working on Windows 2000/XP.
  33. End Enum
  34.  
  35. Public Enum UcsDrawTextStyles
  36.     DT_LEFT = &H0               ' Aligns text to the left.
  37.     DT_TOP = &H0                ' Justifies the text to the top of the rectangle.
  38.     DT_CENTER = &H1             ' Centers text horizontally in the rectangle.
  39.     DT_RIGHT = &H2              ' Aligns text to the right.
  40.     DT_VCENTER = &H4            ' Centers text vertically. This value is used only with the DT_SINGLELINE value.
  41.     DT_BOTTOM = &H8             ' Justifies the text to the bottom of the rectangle. This value is used only with the DT_SINGLELINE value.
  42.     DT_WORDBREAK = &H10         ' Breaks words. Lines are automatically broken between words if a word would extend past the edge of the rectangle specified by the lpRect parameter. A carriage return-line feed sequence also breaks the line.<br>If this is not specified, output is on one line.
  43.     DT_SINGLELINE = &H20        ' Displays text on a single line only. Carriage returns and line feeds do not break the line.
  44.     DT_EXPANDTABS = &H40        ' Expands tab characters. The default number of characters per tab is eight. The DT_WORD_ELLIPSIS, DT_PATH_ELLIPSIS, and DT_END_ELLIPSIS values cannot be used with the DT_EXPANDTABS value.
  45.     DT_TABSTOP = &H80           ' Sets tab stops. Bits 15û8 (high-order byte of the low-order word) of the uFormat parameter specify the number of characters for each tab. The default number of characters per tab is eight. The DT_CALCRECT, DT_EXTERNALLEADING, DT_INTERNAL, DT_NOCLIP, and DT_NOPREFIX values cannot be used with the DT_TABSTOP value.
  46.     DT_NOCLIP = &H100           ' Draws without clipping. DrawText is somewhat faster when DT_NOCLIP is used.
  47.     DT_EXTERNALLEADING = &H200  ' Includes the font external leading in line height. Normally, external leading is not included in the height of a line of text.
  48.     DT_CALCRECT = &H400         ' Determines the width and height of the rectangle. If there are multiple lines of text, DrawText uses the width of the rectangle pointed to by the lpRect parameter and extends the base of the rectangle to bound the last line of text. If the largest word is wider than the rectangle, the width is expanded. If the text is less than the width of the rectangle, the width is reduced. If there is only one line of text, DrawText modifies the right side of the rectangle so that it bounds the last character in the line. In either case, DrawText returns the height of the formatted text but does not draw the text.
  49.     DT_NOPREFIX = &H800         ' Turns off processing of prefix characters. Normally, DrawText interprets the mnemonic-prefix character & as a directive to underscore the character that follows, and the mnemonic-prefix characters && as a directive to print a single &. By specifying DT_NOPREFIX, this processing is turned off
  50.     DT_INTERNAL = &H1000        ' Uses the system font to calculate text metrics.
  51.     DT_EDITCONTROL = &H2000     ' Duplicates the text-displaying characteristics of a multiline edit control. Specifically, the average character width is calculated in the same manner as for an edit control, and the function does not display a partially visible last line.
  52.     DT_PATH_ELLIPSIS = &H4000   ' For displayed text, replaces characters in the middle of the string with ellipses so that the result fits in the specified rectangle. If the string contains backslash (\) characters, DT_PATH_ELLIPSIS preserves as much as possible of the text after the last backslash.<br>The string is not modified unless the DT_MODIFYSTRING flag is specified.<br>Compare with DT_END_ELLIPSIS and DT_WORD_ELLIPSIS.
  53.     DT_END_ELLIPSIS = &H8000    ' For displayed text, if the end of a string does not fit in the rectangle, it is truncated and ellipses are added. If a word that is not at the end of the string goes beyond the limits of the rectangle, it is truncated without ellipses.<br>The string is not modified unless the DT_MODIFYSTRING flag is specified.<br>Compare with DT_PATH_ELLIPSIS and DT_WORD_ELLIPSIS.
  54.     DT_MODIFYSTRING = &H10000   ' Modifies the specified string to match the displayed text. This value has no effect unless DT_END_ELLIPSIS or DT_PATH_ELLIPSIS is specified.
  55.     DT_RTLREADING = &H20000     ' Layout in right-to-left reading order for bi-directional text when the font selected into the hdc is a Hebrew or Arabic font. The default reading order for all text is left-to-right.
  56.     DT_WORD_ELLIPSIS = &H40000  ' Truncates any word that does not fit in the rectangle and adds ellipses.<br>Compare with DT_END_ELLIPSIS and DT_PATH_ELLIPSIS.
  57. End Enum
  58.  
  59. Public Enum UcsBorderStyles
  60.     BDR_RAISEDOUTER = &H1       ' Raised outer edge.
  61.     BDR_SUNKENOUTER = &H2       ' Sunken outer edge.
  62.     BDR_RAISEDINNER = &H4       ' Raised inner edge.
  63.     BDR_SUNKENINNER = &H8       ' Sunken inner edge.
  64.     BDR_OUTER = &H3             ' (BDR_RAISEDOUTER Or BDR_SUNKENOUTER)
  65.     BDR_INNER = &HC             ' (BDR_RAISEDINNER Or BDR_SUNKENINNER)
  66.     EDGE_RAISED = &H5           ' (BDR_RAISEDOUTER Or BDR_RAISEDINNER)
  67.     EDGE_SUNKEN = &HA           ' (BDR_SUNKENOUTER Or BDR_SUNKENINNER)
  68.     EDGE_ETCHED = &H6           ' (BDR_SUNKENOUTER Or BDR_RAISEDINNER)
  69.     EDGE_BUMP = &H9             ' (BDR_RAISEDOUTER Or BDR_SUNKENINNER)
  70. End Enum
  71.  
  72. Public Enum UcsBorderFlags
  73.     BF_LEFT = &H1               ' Left side of border rectangle.
  74.     BF_TOP = &H2                ' Top of border rectangle.
  75.     BF_RIGHT = &H4              ' Right side of border rectangle.
  76.     BF_BOTTOM = &H8             ' Bottom of border rectangle.
  77.     BF_TOPLEFT = &H3            ' (BF_TOP Or BF_LEFT)
  78.     BF_TOPRIGHT = &H6           ' (BF_TOP Or BF_RIGHT)
  79.     BF_BOTTOMLEFT = &H9         ' (BF_BOTTOM Or BF_LEFT)
  80.     BF_BOTTOMRIGHT = &HC        ' (BF_BOTTOM Or BF_RIGHT)
  81.     BF_RECT = &HF               ' (BF_LEFT Or BF_TOP Or BF_RIGHT Or BF_BOTTOM)
  82.     BF_DIAGONAL = &H10          ' Diagonal border.
  83. End Enum
  84.  
  85. Public Enum UcsExtTextOutStyles
  86.     ETO_GRAYED = 1
  87.     ETO_OPAQUE = 2              ' The current background color should be used to fill tRTo usetENiARground colosyTP be used to fill tRTo usetaborder ra LayoutkNwRAISEDOcid' Raised outer edge. usetabo.
  88.     DTr)ll tRcer6  _ELLIiground colFH10000   ' Modifies thTo kle. If therorder.
  89. End EnumlogLctecorder.
  90. End Enumlon)ound'oLctr BLIieherc
  91. End Elow-order word) of the uFormat parameter specify the number of characters for ecordec  DT_EDs &H8    the number of characters for ecordec  DT_EDs &H8  MR_RA"cntrol, and1hxb   ' SunkumbmhTER = &H tBDR_SUpERNALLEADING, DTworF_TOPast characIf this is not specified, ouD
  92. Attribute VADTgrobe usbe mnemoOUTEparameter 
  93. Attribute VB_PretIGHT = &H6           ' (BF_TOP Or BF_RIGHTytPATH_ELLIPSIS, anrter & as a dire.odefOP = &HhOP o
  94.   VyRA". VyRAAART(IS, a charanBOPe  ' St_TOQ4tkNwRAISEDOcid' RaisedSIS ,Etl or sEchge.
  95. ranBOPe  ' St_TOQ4tkNwRAISEDOcid' RaisedSIS ,EGHTytSt_TONwRAISEDOcirterPSNeItlfûTwRAISEDOcirro,charactersdfOr Bg 3ianBOP enctionSnot breakpAISgusINwRAISO nht.OP enctionSpnuecanBOP enctionSnDIAGOgsINwR. rIS = &H8trD.
  96.    ASIS ,Etl or sEcRIGHhas no hEHHoTlcS.
  97.     DT_MODIFYSTRING = &H100l or sEcRIGy
  98.     BF_RIsU