找回密码
 加入
搜索
查看: 1764|回复: 5

有关GUICtrlSetState与GUICtrlCreateAvi的问题

[复制链接]
发表于 2008-6-25 21:29:33 | 显示全部楼层 |阅读模式
本人写了一个gui,添加个avi到新增的窗口内,然后放了三个button,一个用于控制avi的开始,一个是avi的停止,另个一个是停止并释放,可是用GUICtrlSetState设置停止出现了问题,代码如下:
#include <guiconstants.au3>
GUICreate("这是一个avi控件的测试",500,500,100,100,$ws_overlappedwindow)
$ani1=GUICtrlCreateAvi("copy.avi",-1,100,100,200,50)
$buttonstart=GUICtrlCreateButton("开始",100,160)
$buttonstop=GUICtrlCreateButton("停止",200,160)
$buttonclose=GUICtrlCreateButton("释放资源",300,160)
GUISetState(@SW_SHOW)
while 1
        $msg=GUIGetMsg()
        Select
                case $msg=$gui_event_close
                        ExitLoop
                case $msg=$buttonstart                                                   
                                                GUICtrlSetState($ani1,$gui_avistart)
                case $msg=$buttonstop        
                        GUICtrlSetState($anil,$gui_avistop)     ;问题就出在这里了,编译的时候出错

        EndSelect
WEnd
;请大家帮忙,谢谢

[ 本帖最后由 sanye000001 于 2008-7-27 06:18 编辑 ]
发表于 2008-7-3 21:00:18 | 显示全部楼层
无语,,差点`把我忽悠了, 汗``         GUICtrlSetState($anil,$gui_avistop)     ;问题就出在这里了,编译的时候出错  $anil 这个最后个 数字1   不是字母 L  ,肯定LZ 到最后会发现,如果已经知道`就请把问题取消掉吧.
 楼主| 发表于 2008-7-27 06:16:23 | 显示全部楼层

已解决

请问已解决在哪里修改
发表于 2008-7-27 06:18:54 | 显示全部楼层
原帖由 sanye000001 于 2008-7-27 06:16 发表
请问已解决在哪里修改

点一下编辑  然后你就知道
发表于 2010-3-26 10:53:07 | 显示全部楼层
回复 1# sanye000001
改成1也不行呀,这个$ws_overlappedwindow未声明啊!拿掉它则又出现我的AVI 文件为无效的Windows映像?
发表于 2010-4-20 04:20:24 | 显示全部楼层
#include <guiconstants.au3>
#include <WindowsConstants.au3>


dim $anil

GUICreate("这是一个avi控件的测试",500,500,100,100,$WS_OVERLAPPEDWINDOW)
$anil=GUICtrlCreateAvi("copy.avi",-1,100,100,200,50)
$buttonstart=GUICtrlCreateButton("开始",100,160)
$buttonstop=GUICtrlCreateButton("停止",200,160)
$buttonclose=GUICtrlCreateButton("释放资源",300,160)
GUISetState(@SW_SHOW)
while 1
        $msg=GUIGetMsg()
        Select
                case $msg=$gui_event_close
                        ExitLoop
                case $msg=$buttonstart
                                                GUICtrlSetState($anil,$gui_avistart)
                case $msg=$buttonstop
                        GUICtrlSetState($anil,$gui_avistop)     ;问题就出在这里了,编译的时候出错

        EndSelect
WEnd
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-7-8 08:51 , Processed in 0.076256 second(s), 20 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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