当前位置: 代码迷 >> PB >> 透明gif作为listview图标完全透明,放在picture控件里面就不透明了,该怎么处理
  详细解决方案

透明gif作为listview图标完全透明,放在picture控件里面就不透明了,该怎么处理

热度:57   发布时间:2016-04-29 09:08:08.0
透明gif作为listview图标完全透明,放在picture控件里面就不透明了
pb9.03 8836


透明gif作为listview图标完全透明,放在picture控件里面就不透明了,老问题?

可以解决吗?

------解决方案--------------------
$PBExportHeader$w_test.srw
forward
global type w_test from window
end type
type p_1 from picture within w_test
end type
type bitmap from structure within w_test
end type
end forward

global type bitmap from structure
long bmtype
long bmwidth
long bmheight
long bmwidthbytes
long bmplanes
long bmbitspixel
blob bmbits
end type

global type w_test from window
integer width = 2217
integer height = 1428
boolean titlebar = true
string title = "Untitled"
boolean controlmenu = true
boolean minbox = true
boolean maxbox = true
boolean resizable = true
long backcolor = 67108864
string icon = "AppIcon!"
boolean center = true
event ue_paint pbm_paint
p_1 p_1
end type
global w_test w_test

type prototypes
FUNCTION ulong GetPixel(ulong hdc,ulong px,ulong py) LIBRARY "gdi32.dll"
Function uLong GetDC(uLong hwnd) LIBRARY "user32.dll"
//Function uLong StretchBlt(uLong hdc,uLong xx,uLong yy,uLong nWidth,uLong nHeight,uLong hSrcDC,uLong xSrc,uLong ySrc,uLong nSrcWidth,uLong nSrcHeight,uLong dwRop) LIBRARY "gdi32.dll"
Function uLong DeleteDC(uLong hdc) LIBRARY "gdi32.dll"
Function uLong DeleteObject(uLong hObject) LIBRARY "gdi32.dll"
Function uLong SelectObject(uLong hdc,uLong hObject) LIBRARY "gdi32.dll"
Function uLong GetObjectBitmap( uLong hgdiobj, int cbBuffer, ref bitmap bm ) library "gdi32.dll" alias for GetObjectA
Function uLong LoadImage(uLong hInst,ref String lpsz,uLong un1,uLong n1,uLong n2,uLong un2) LIBRARY "user32.dll" ALIAS FOR "LoadImageA"
Function uLong CreateCompatibleDC(uLong hdc) LIBRARY "gdi32.dll"
FUNCTION ulong ReleaseDC(ulong hwnd,ulong hdc) LIBRARY "user32.dll"
Function uLong SetBkColor(uLong hdc,uLong crColor) LIBRARY "gdi32.dll"
Function long CreateCompatibleBitmap ( long hdc, long nwidth, long nheight ) library "gdi32"
Function long CreateBitmap ( long nwidth, long nheight, long nplanes, long nbitcount, long lpbits ) library "gdi32"
Function uLong BitBlt(uLong hDestDC,uLong xx,uLong yy,uLong nWidth,uLong nHeight,uLong hSrcDC,uLong xSrc,uLong ySrc,uLong dwRop) LIBRARY "gdi32.dll"
FUNCTION ulong SetBkMode(ulong hdc,ulong nBkMode) LIBRARY "gdi32.dll"

end prototypes
type variables
constant long SRCCOPY = 13369376
constant long NOTSRCCOPY = 3342344
constant long SRCAND = 8913094
constant long SRCINVERT = 6684742
uLONG il_memDC,il_old,il_windc,il_outputdc
ulong il_rgb
//需要透明输出的图片,自己定义图片路径
string is_cmenu_pic = 'C:\powerbuilder\SERVER.BMP'
integer ii_bmpwidth,ii_bmpheight
end variables
forward prototypes
public subroutine wf_transparentblt (long dstdc, long srcdc, integer srcx, integer srcy, integer srcw, integer srch, integer dstx, integer dsty, long transcolor)
public subroutine wf_paint ()
  相关解决方案