浅谈如何利用PB实现树型列表动态半透明提示(三)(原创)

王朝mssql·作者佚名  2006-12-17
窄屏简体版  字體: |||超大  

浅谈如何利用PB实现树型列表动态半透明提示(三)(原创)

浅谈如何利用PB实现树型列表动态半透明提示(三)(原创) 作者:BALLOONMAN2002 2004年6月26日

三、半透明效果实现

1、创建一个可视USER OBJECT对象,并在主窗口中创建该UO的实例变量。

2、声明本地外部函数:

Function ulong GetDC(ulong hwnd) LIBRARY "user32.dll"

Function ulong BitBlt(ulong hDestDC,ulong x,ulong y,ulong nWidth,ulong nHeight,ulong hSrcDC,ulong xSrc,ulong ySrc,ulong dwRop) LIBRARY "gdi32.dll"

Function ulong ReleaseDC(ulong hwnd,ulong hdc) LIBRARY "user32.dll"

Function ulong CreateCompatibleDC(ulong hdc) LIBRARY "gdi32.dll"

Function ulong CreateCompatibleBitmap(ulong hdc,ulong nWidth,ulong nHeight) LIBRARY "gdi32.dll"

SUBROUTINE Sleep(ulong dwMilliseconds) LIBRARY "kernel32.dll"

Function ulong SelectObject(ulong hdc,ulong hObject) LIBRARY "gdi32.dll"

Function ulong AlphaBlend(long hDestDC , long X, long Y , long nWidth , long nHeight, long hSrcDC,long xSrc,long ySrc, long WidthSrc, long HeightSrc ,long dreamAKA ) LIBRARY "msimg32"

Function ulong DeleteDC(ulong hdc) LIBRARY "gdi32.dll"

Function ulong GetSystemMetrics(ulong nIndex) LIBRARY "user32.dll"

SUBROUTINE CopyMemory2 (ref long Destination , blendfunction Source, long Length) LIBRARY "kernel32" Alias for "RtlMoveMemory"

Function ulong DeleteObject(ulong hObject) LIBRARY "gdi32.dll"

3、处理主窗口的TIMER事件,用于定期触发提示信息:

long ll_x,ll_y

if ii_tip > 0 then

if ib_tipshow then

ib_tipshow = false

iuo_tips.hide()

timer(0)

else

ib_tipshow = true

ll_x = w_main.pointerx() + 50

ll_y = w_main.pointery() - iuo_tips.height - 5

if ll_y < 2 then

ll_y = 2

end if

//wf_maketrans(iuo_tips,iuo_tips.mle_1,il_x,il_y,50)

wf_maketrans(iuo_tips,iuo_tips.mle_1,ll_x,ll_y,40)

//上述函数是用于实现半透明效果的函数

timer(6)

end if

end if

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
© 2005- 王朝網路 版權所有 導航