Projects

Find all our projects in development below.
All source code is GNU General Public License (GPL)

RemoteAmp

Browsing Server/TextEllipseMod.bas (829 B)

Attribute VB_Name = "TextEllipseMod"

Private Type RECT
    Left As Long
    Top As Long
    Right As Long
    Bottom As Long
End Type

Public Const DT_PATH_ELLIPSIS As Long = &H4000
Public Const DT_END_ELLIPSIS As Long = &H8000
Public Const DT_WORD_ELLIPSIS As Long = &H40000

Private Declare Function DrawText Lib "user32" Alias "DrawTextA" (ByVal hDC As Long, ByVal lpStr As String, ByVal nCount As Long, lpRect As RECT, ByVal wFormat As Long) As Long

Public Function CEllipse(hDC As Long, Width As Long, ByVal Text As String, EllipseType As Long) As String
    Const DT_CALCRECT = &H400
    Const DT_MODIFYSTRING = &H10000
    Dim Rct As RECT
    Rct.Right = Width / Screen.TwipsPerPixelX
    DrawText hDC, Text, -1, Rct, DT_CALCRECT Or DT_MODIFYSTRING Or EllipseType
    CEllipse = Text
End Function

Download Server/TextEllipseMod.bas

Back to file list


Back to project page