wanghong01 发表于 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
        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

ahphsautoit 发表于 2010-11-25 14:29:12

测试了下,能显示,但空白一片。

the886 发表于 2010-11-26 14:27:31

学习了,,,,,,,,
页: [1]
查看完整版本: 凭空画按钮,代码不完善