rojie3698 发表于 2010-9-2 15:15:09

代码出错

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <ListViewConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=E:\程序设计\加密解密\Form12.kxf
$Form1 = GUICreate("Form1", 492, 414, 192, 114)
$ListView1 = GUICtrlCreateListView("名称|IP|密码", 48, 72, 401, 249, -1, BitOR($GUI_SS_DEFAULT_LISTVIEWEX,$LVS_EX_GRIDLINES))
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 100)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 1, 150)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 2, 150)
$Button1 = GUICtrlCreateButton("连接", 57, 32, 89, 25)
$Button2 = GUICtrlCreateButton("添加连接", 193, 32, 89, 25)
$Button3 = GUICtrlCreateButton("删除连接", 337, 32, 89, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit

        EndSwitch
WEnd谁帮我看看这代码错在哪里啊?

Ziya 发表于 2010-9-2 15:26:18

$GUI_SS_DEFAULT_LISTVIEWEX

这是哪儿来的?
貌似没见过这个

xyold1 发表于 2010-9-2 15:28:06

不清楚
以下编译通过,效果应一样吧#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <ListViewConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=E:\程序设计\加密解密\Form12.kxf
$Form1 = GUICreate("Form1", 492, 414, 192, 114)
$ListView1 = GUICtrlCreateListView("名称|IP|密码", 48, 72, 401, 249, -1, BitOR($LVS_SHOWSELALWAYS,$LVS_SINGLESEL,$LVS_EX_GRIDLINES))
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 100)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 1, 150)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 2, 150)
$Button1 = GUICtrlCreateButton("连接", 57, 32, 89, 25)
$Button2 = GUICtrlCreateButton("添加连接", 193, 32, 89, 25)
$Button3 = GUICtrlCreateButton("删除连接", 337, 32, 89, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
      $nMsg = GUIGetMsg()
      Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit

      EndSwitch
WEnd默认值(-1):$LVS_SHOWSELALWAYS, $LVS_SINGLESEL

$GUI_SS_DEFAULT_LISTVIEW 好象没有声明

menfan 发表于 2010-9-2 15:34:09

$GUI_SS_DEFAULT_LISTVIEWEX是不是扩展的样式啊,没见过哈呵呵

t87564833 发表于 2010-9-2 20:58:48

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <ListViewConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=E:\程序设计\加密解密\Form12.kxf
$Form1 = GUICreate("Form1", 492, 414, 192, 114)
$ListView1 = GUICtrlCreateListView("名称|IP|密码", 48, 72, 401, 249, -1)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 100)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 1, 150)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 2, 150)
$Button1 = GUICtrlCreateButton("连接", 57, 32, 89, 25)
$Button2 = GUICtrlCreateButton("添加连接", 193, 32, 89, 25)
$Button3 = GUICtrlCreateButton("删除连接", 337, 32, 89, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
      $nMsg = GUIGetMsg()
      Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit

      EndSwitch
WEnd不知道符合不符合要求
页: [1]
查看完整版本: 代码出错