Козлится классовая функция:
- Код: Выделить всё
Public Function CreateIndirect(lpLogBrush As LOGBRUSH) As Long
tmpLong = CreateBrushIndirect(lpLogBrush)
ReplaceBrush tmpLong, lHandle
CreateIndirect = lHandle
End Function
Содержимое модуля (целиком):
- Код: Выделить всё
Option Explicit
Public Enum BrushStyles
BS_SOLID = 0
BS_NULL = 1
BS_HOLLOW = BS_NULL
BS_HATCHED = 2
BS_PATTERN = 3
BS_INDEXED = 4
BS_DIBPATTERN = 5
BS_DIBPATTERNPT = 6
BS_PATTERN8X8 = 7
BS_DIBPATTERN8X8 = 8
End Enum
Public Enum BrushFillStyles
HS_HORIZONTAL = 0 ' -----
HS_VERTICAL = 1 ' |||||
HS_FDIAGONAL = 2 ' \\\\\
HS_BDIAGONAL = 3 ' /////
HS_CROSS = 4 ' +++++
HS_DIAGCROSS = 5 ' xxxxx
End Enum
Public Enum SysElements
COLOR_SCROLLBAR = 0
COLOR_BACKGROUND = 1
COLOR_ACTIVECAPTION = 2
COLOR_INACTIVECAPTION = 3
COLOR_MENU = 4
COLOR_WINDOW = 5
COLOR_WINDOWFRAME = 6
COLOR_MENUTEXT = 7
COLOR_WINDOWTEXT = 8
COLOR_CAPTIONTEXT = 9
COLOR_ACTIVEBORDER = 10
COLOR_INACTIVEBORDER = 11
COLOR_APPWORKSPACE = 12
COLOR_HIGHLIGHT = 13
COLOR_HIGHLIGHTTEXT = 14
COLOR_BTNFACE = 15
COLOR_BTNSHADOW = 16
COLOR_GRAYTEXT = 17
COLOR_BTNTEXT = 18
COLOR_INACTIVECAPTIONTEXT = 19
COLOR_BTNHIGHLIGHT = 20
End Enum
Public Type LOGBRUSH
lbStyle As BrushStyles
lbColor As Long
lbHatch As BrushFillStyles
End Type