haihong0721 发表于 2008-12-6 10:53:28

关于TreeView 控件添加样式的问题

guictrlcreategroup("你好啊 ",10,10,100,250,BitOr($TVS_HASBUTTONS, $TVS_HASLINES, $TVS_LINESATROOT, $TVS_DISABLEDRAGDROP, $TVS_SHOWSELALWAYS),$WS_EX_CLIENTEDGE)

添加样式总是出错

clonecd 发表于 2008-12-6 11:06:44

由于你给的信息少,我只能给出以下建议:
把下面两句放到你脚本的开始(最前面)。

#include <WindowsConstants.au3>
#include <TreeviewConstants.au3>

guictrlcreategroup这个应该要改为以下格式
GUICtrlCreateTreeView ( 左侧, 上方 [, 宽度 [, 高度 [, 样式 [, 扩展样式]]]] )

还是要多看看帮助吧。

[ 本帖最后由 clonecd 于 2008-12-6 23:16 编辑 ]

clonecd 发表于 2008-12-6 11:15:33

guictrlcreategroup是一个东东
GUICtrlCreateTreeView 又是另外一个东东,不要把它们杂交。

大绯狼 发表于 2008-12-6 11:25:28

楼主写的不明白。。。。。。

haihong0721 发表于 2008-12-6 14:15:40

你我吧我写得代码 给你看看是 那不对啊

#include <TreeviewConstants.au3>

guicreate("我的窗口",500,300)
guisetstate(@sw_show)

guictrlcreategroup("你好啊 ",10,10,100,250,BitOr($TVS_HASBUTTONS, $TVS_HASLINES, $TVS_LINESATROOT, $TVS_DISABLEDRAGDROP, $TVS_SHOWSELALWAYS),$WS_EX_CLIENTEDGE)


while 1
        $msg=guigetmsg()
        if $msg=$gui_event_close then ExitLoop
WEnd

haihong0721 发表于 2008-12-6 14:17:14

guictrlcreategroup ( 左侧, 上方 [, 宽度 [, 高度 [, 样式 [, 扩展样式]]]] )
   用 这个格式 也不对啊

大绯狼 发表于 2008-12-6 14:34:13

3.2.9.14测试通过

clonecd 发表于 2008-12-6 23:35:53

不知道楼主有没有看我3楼回帖的每一个英文字母。
看了你6楼的回帖,我先闪。

haihong0721 发表于 2008-12-7 19:55:57

看了 的只是我 弄错了 是 guictrlcreategroup    标题弄错咯

clonecd 发表于 2008-12-8 00:22:27

#include <GUIConstantsEx.au3> ;创建GUI的话这一句不要忘了。
#include <WindowsConstants.au3> ;使用公共样式
#include <TreeviewConstants.au3> ;使用TreeView样式

guicreate("我的窗口",500,300)
guisetstate(@sw_show)

GUICtrlCreateTreeView(10,10,100,250,BitOr($TVS_HASBUTTONS, $TVS_HASLINES, $TVS_LINESATROOT, $TVS_DISABLEDRAGDROP, $TVS_SHOWSELALWAYS),$WS_EX_CLIENTEDGE)


while 1
      $msg=guigetmsg()
      if $msg = $GUI_EVENT_CLOSE then ExitLoop
WEnd

haihong0721 发表于 2008-12-9 09:31:12

OK      懂了   谢谢哦
页: [1]
查看完整版本: 关于TreeView 控件添加样式的问题