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

来源:互联网 发布:淘宝提前收款疯狂扣费 编辑:程序博客网 时间:2024/05/19 06:19
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></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"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>