(на чёрном фоне r=13,g=11,b=12) без следов рисования
если делать не через GdipGetDC ,
а с помощью CreateCompatibleDC и CreateDIBSection ,то всё нормально
подскажите пожалуйста ,что не так
- Код: Выделить всё
Private Sub Form_Load()
Dim curWinLong As Long, _
winSize As size, _
srcPoint As POINTAPI, _
myImage As Long, _
myGraphics As Long, _
myDc As Long, _
blend As BLENDFUNCTION
curWinLong = GetWindowLong(hwnd, GWL_EXSTYLE)
SetWindowLong hwnd, GWL_EXSTYLE, curWinLong Or WS_EX_LAYERED
me.ScaleMode = vbPixels
winSize.cx = Me.ScaleWidth
winSize.cy = Me.ScaleHeight
With blend
.AlphaFormat = AC_SRC_ALPHA
.BlendFlags = 0
.BlendOp = AC_SRC_OVER
.SourceConstantAlpha = 255
End With
GdipCreateBitmapFromScan0 winSize.cx, winSize.cy, 0, PixelFormat32bppARGB, ByVal 0, myImage
GdipGetImageGraphicsContext myImage, myGraphics
'''''рисование
GdipGetDC myGraphics, myDc
UpdateLayeredWindow hwnd, hDC, ByVal 0&, winSize, myDc, srcPoint, 0, blend, ULW_ALPHA
GdipReleaseDC myGraphics, myDc
GdipDeleteGraphics myGraphics
GdipDisposeImage myImage
End Sub