You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
63 lines
2.9 KiB
63 lines
2.9 KiB
Attribute VB_Name = "Utils"
|
|
Option Explicit
|
|
|
|
Type RECT
|
|
Left As Long
|
|
Top As Long
|
|
Right As Long
|
|
Bottom As Long
|
|
End Type
|
|
|
|
Type Size
|
|
cx As Long
|
|
cy As Long
|
|
End Type
|
|
|
|
Declare Function ExtTextOut Lib "gdi32" Alias "ExtTextOutA" (ByVal hdc As Long, ByVal X As Long, ByVal Y As Long, ByVal wOptions As Long, lpRect As RECT, ByVal lpString As String, ByVal nCount As Long, ByVal lpDx As Long) As Long
|
|
Declare Function SetBkColor Lib "gdi32" (ByVal hdc As Long, ByVal crColor As Long) As Long
|
|
Declare Function GetBkColor Lib "gdi32" (ByVal hdc As Long) As Long
|
|
Declare Function GetTextColor Lib "gdi32" (ByVal hdc As Long) As Long
|
|
Declare Function SetTextColor Lib "gdi32" (ByVal hdc As Long, ByVal crColor As Long) As Long
|
|
Declare Function CreateCompatibleDC Lib "gdi32" (ByVal hdc As Long) As Long
|
|
Declare Function CreateCompatibleBitmap Lib "gdi32" (ByVal hdc As Long, ByVal nWidth As Long, ByVal nHeight As Long) As Long
|
|
Declare Function BitBlt Lib "gdi32" (ByVal hDestDC As Long, ByVal X As Long, ByVal Y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long) As Long
|
|
Declare Function DeleteDC Lib "gdi32" (ByVal hdc As Long) As Long
|
|
Declare Function SelectObject Lib "gdi32" (ByVal hdc As Long, ByVal hObject As Long) As Long
|
|
Declare Function DeleteObject Lib "gdi32" (ByVal hObject As Long) As Long
|
|
Declare Function GetSysColor Lib "user32" (ByVal nIndex As Long) As Long
|
|
Declare Function GetTextExtentPoint32 Lib "gdi32" Alias "GetTextExtentPoint32A" (ByVal hdc As Long, ByVal lpsz As String, ByVal cbString As Long, lpSize As Size) As Long
|
|
Declare Function InvertRect Lib "user32" (ByVal hdc As Long, lpRect As RECT) As Long
|
|
Declare Function InvalidateRect Lib "user32" (ByVal hwnd As Long, lpRect As RECT, ByVal bErase As Long) As Long
|
|
Declare Function UpdateWindow Lib "user32" (ByVal hwnd As Long) As Long
|
|
Declare Function DrawFocusRect Lib "user32" (ByVal hdc As Long, lpRect As RECT) As Long
|
|
Declare Sub OleTranslateColor Lib "oleaut32.dll" (ByVal ColorIn As Long, ByVal hPal As Long, ByRef RGBColorOut As Long)
|
|
|
|
Public Const ETO_OPAQUE = 2
|
|
Public Const ETO_CLIPPED = 4
|
|
|
|
Public Const SRCCOPY = &HCC0020 ' (DWORD) dest = source
|
|
|
|
Public Const COLOR_SCROLLBAR = 0
|
|
Public Const COLOR_BACKGROUND = 1
|
|
Public Const COLOR_ACTIVECAPTION = 2
|
|
Public Const COLOR_INACTIVECAPTION = 3
|
|
Public Const COLOR_MENU = 4
|
|
Public Const COLOR_WINDOW = 5
|
|
Public Const COLOR_WINDOWFRAME = 6
|
|
Public Const COLOR_MENUTEXT = 7
|
|
Public Const COLOR_WINDOWTEXT = 8
|
|
Public Const COLOR_CAPTIONTEXT = 9
|
|
Public Const COLOR_ACTIVEBORDER = 10
|
|
Public Const COLOR_INACTIVEBORDER = 11
|
|
Public Const COLOR_APPWORKSPACE = 12
|
|
Public Const COLOR_HIGHLIGHT = 13
|
|
Public Const COLOR_HIGHLIGHTTEXT = 14
|
|
Public Const COLOR_BTNFACE = 15
|
|
Public Const COLOR_BTNSHADOW = 16
|
|
Public Const COLOR_GRAYTEXT = 17
|
|
Public Const COLOR_BTNTEXT = 18
|
|
Public Const COLOR_INACTIVECAPTIONTEXT = 19
|
|
Public Const COLOR_BTNHIGHLIGHT = 20
|
|
|
|
|