Public feed #955571

Stuff

public text v1 · immutable
Raw Edit
·published 2008-03-24 18:49 UTC
rendered paste body
Private Sub DrawBackGrad(ByVal hdc As Long, ByVal hwnd As Long, ByRef pRect As RECT2, Color1 As RGB, Color2 As RGB, ByVal Direction As Long)

    Dim v(1)   As TRIVERTEX
    Dim GRct   As GRADIENT_RECT

    '-- from

    With v(0)
        .x = pRect.X1
        .Y = pRect.Y1
        .R = 123 'Color1.R
        .G = 123 'Color1.G
        .b = 123 'Color1.b
        .Alpha = 0
    End With                                          'V(0)
    '-- to
    With v(1)
        .x = pRect.X2
        .Y = pRect.Y2
        .R = 255 'Color2.R
        .G = 255 'Color2.G
        .b = 255 'Color2.b
        .Alpha = 0
    End With                                          'V(1)

    GRct.UpperLeft = 0
    GRct.LowerRight = 1

    GradientFillRect hdc, v(0), 2, GRct, 1, &H1 'Direction
 End Sub