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

[BUG报告] command消息下不能使用filelisttiarray

[复制链接]
发表于 2015-7-2 14:58:01 | 显示全部楼层 |阅读模式
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GuiButton.au3>
#include <File.au3>
#include <Array.au3>
$Form = GUICreate("",400,300)
$gx =  _GUICtrlButton_Create($Form,"TEST",10,10,75,25)
GUISetState(@SW_SHOW)
GUIRegisterMsg($WM_COMMAND, "WM_COMMAND")
While 1
        If GUIGetMsg() = $GUI_EVENT_CLOSE Then Exit
WEnd
Func WM_COMMAND($hWnd, $Msg, $wParam, $lParam)
        #forceref $hWnd, $Msg
        Local $nNotifyCode = BitShift($wParam, 16)
        Local $nID = BitAND($wParam, 0x0000FFFF)
        Local $hCtrl = $lParam
        Switch $hCtrl
                Case $gx
                        If $nNotifyCode = $BN_CLICKED Then 
                                $file = _FileListToArray(@ScriptDir)
                                _ArrayDisplay($file)
                        EndIf
        EndSwitch
        Return $GUI_RUNDEFMSG
EndFunc
发表于 2015-7-2 16:50:07 | 显示全部楼层
应该是_ArrayDisplay问题,而不是_FileListToArray有问题
发表于 2015-7-5 07:48:12 | 显示全部楼层
学习。。。。。。。。。。。。。。
发表于 2015-7-7 18:18:22 | 显示全部楼层
测试了一下,确实是_ArrayDisplay的原因,_FileListToArray可以正确运行。
发表于 2015-7-7 18:31:34 | 显示全部楼层
本帖最后由 luren666 于 2015-7-7 18:40 编辑

应该是注册COMMAND消息的原因,使_arraydisplay()的窗口不能正确响应消息了。
 楼主| 发表于 2015-8-4 16:01:42 | 显示全部楼层
回复 2# wangms


    直接用循环把数组返回用msgbox显示也是有问题的
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-3-29 01:28 , Processed in 0.072430 second(s), 19 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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