[求教]UpdateLayeredWindow无效,用来做PNG动画
[求教]UpdateLayeredWindow无效
UpdateLayeredWindow不知哪里不对啊,无法显出图像,请大家帮我看看
下载代码看全部代码的请看第二个窗口,就是他有问题
''通用里的声明
Dim mDC As Long
Dim blendFunc32bpp As BLENDFUNCTION
Private Sub Form_Load()
Dim winSize As Size
Dim srcPoint As POINTAPI
mDC = CreateCompatibleDC(Me.hdc)
curWinLong = GetWindowLong(Me.hwnd, GWL_EXSTYLE)
SetWindowLong Me.hwnd, GWL_EXSTYLE, curWinLong Or WS_EX_LAYERED
srcPoint.x = 0
srcPoint.y = 0
winSize.cx = Me.ScaleWidth
winSize.cy = Me.ScaleHeight
With blendFunc32bpp
.AlphaFormat = AC_SRC_ALPHA
.BlendFlags = 0
.BlendOp = AC_SRC_OVER
.SourceConstantAlpha = 255
End With
Call UpdateLayeredWindow(Me.hwnd, Me.hdc, ByVal 0&, winSize, mDC, srcPoint, 0, blendFunc32bpp, ULW_ALPHA)
End Sub
以下是全代码
[ 本帖最后由 wzqqwz 于 2006-9-2 11:42 编辑 ]