找回密码
 加入
搜索
查看: 1330|回复: 2

[GUI管理] 凭空画按钮,代码不完善

[复制链接]
发表于 2010-11-24 17:47:44 | 显示全部楼层 |阅读模式
找到一段不完善的画按钮的代码
我是菜鸟,有人能完善一下吗?
谢谢了
APIDrawButton("确定",200,50,-1,100)
MsgBox(0,"","")
func APIDrawButton($Text,$_XL,$_YT,$_XR,$_YB)
        SplashTextOn("Splash",$Text,$_XL,$_YT,$_XR,$_YB,33)
        $SplashID = WinGetHandle ( "Splash")
        $Rectangle = DllStructCreate("int;int;int;int")
        $hdc = DllCall("user32.dll", "hwnd", "GetDC", "hwnd", $SplashID)
        $hdc = $hdc[0]
        DllStructSetData($Rectangle, 1, 0)
        DllStructSetData($Rectangle, 2, 0)
        DllStructSetData($Rectangle, 3, $_XL)
        DllStructSetData($Rectangle, 4, $_YT)
        DllCall("user32.dll","none","DrawFrameControl", "hwnd", $hdc, "ptr", DllStructGetPtr($Rectangle), "int",0x0000, "int", 0x0002)
        DllCall("user32.dll", "hwnd", "ReleaseDC","hwnd", $SplashID, "hwnd", $hdc);  
endfunc
发表于 2010-11-25 14:29:12 | 显示全部楼层
测试了下,能显示,但空白一片。
发表于 2010-11-26 14:27:31 | 显示全部楼层
学习了,,,,,,,,
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-9-21 17:23 , Processed in 0.079074 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表