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

<script type="text/javascript"> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>
<script type="text/javascript"> </script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>

作者: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

<script type="text/javascript"> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>
<script type="text/javascript"> </script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值