找回密码
 加入
搜索
查看: 10674|回复: 30

[AU3基础] 使用$WS_EX_CONTROLPARENT会导致子窗口滚动条不能使用鼠标操作,何解?(已解决)

[复制链接]
发表于 2018-3-26 23:07:56 | 显示全部楼层 |阅读模式
本帖最后由 tubaba 于 2018-3-28 19:30 编辑

使用$WS_EX_CONTROLPARENT会导致子窗口滚动条不能使用鼠标操作,何解?
库文件在此

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#include <GuiScrollBars_Ex.au3>
#include <ScrollBarConstants.au3>
#include <SendMessage.au3>
#include <WinAPI.au3> ; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

Global $Form[6]

$hGUI = GUICreate("Test", 400, 300)
$button0 = GUICtrlCreateButton("  0  ", 5, 5)
$button1 = GUICtrlCreateButton("  1  ", 5, 35)

For $tabForm = 0 To 1
;~     $Form[$tabForm] = GUICreate("", 200, 100, 200, 200,  BitOR($WS_CHILD, $WS_TABSTOP), -1, $hGUI);不带$WS_EX_CONTROLPARENT则正常
    $Form[$tabForm] = GUICreate("", 200, 100, 200, 200,  BitOR($WS_CHILD, $WS_TABSTOP), $WS_EX_CONTROLPARENT, $hGUI);使用$WS_EX_CONTROLPARENT会导致子窗口滚动条不能使用鼠标操作,何解?
    GUISetBkColor(0xF5F5F5, $Form[$tabForm])
    GUICtrlCreateLabel("Form " & $tabForm, 20, 20)
    GUICtrlCreatebutton("button" & $tabForm, 20, 50)
    GUICtrlCreatebutton("button2" & $tabForm, 20, 80)
    _GUIScrollbars_Generate($Form[$tabForm], 0, 200)
Next

GUISetState(@SW_SHOW, $Form[0])
GUISetState(@SW_SHOW, $hGUI)

$button = $Form[0]

While 1
    Switch GUIGetMsg()
        Case $GUI_EVENT_CLOSE
            Exit
        Case $button0
            GUISetState(@SW_HIDE, $button)
            GUISetState(@SW_SHOW, $Form[0])
            $button = $Form[0]
        Case $button1
            GUISetState(@SW_SHOW, $Form[1])
            GUISetState(@SW_HIDE, $button)
            $button = $Form[1]
    EndSwitch
WEnd

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
 楼主| 发表于 2018-3-28 19:27:17 | 显示全部楼层
几天了,度娘无果.还是自己解决了.答案回复可见


游客,如果您要查看本帖隐藏内容请回复
发表于 2018-4-29 01:08:34 | 显示全部楼层
发表于 2018-4-29 01:38:49 | 显示全部楼层
本帖最后由 kk_lee69 于 2018-5-2 22:41 编辑

看看  怎麼解決的

留個腳印 MacGyver
发表于 2018-5-2 18:37:51 | 显示全部楼层
遇到滚动条问题,学习下,参考参考。
发表于 2018-5-2 19:44:36 | 显示全部楼层
回复看看,参考参考。
发表于 2018-5-2 20:26:37 | 显示全部楼层
回复学习 
发表于 2018-5-2 22:37:30 | 显示全部楼层
自问自答中解决了问题,我很佩服
发表于 2018-5-3 00:30:56 | 显示全部楼层
遇到滚动条问题,学习下,参考参考
发表于 2018-5-3 09:04:03 | 显示全部楼层
看看啥内容
发表于 2018-5-5 16:03:24 | 显示全部楼层
学习下
发表于 2018-6-23 04:21:13 | 显示全部楼层
谢谢了,先看看
发表于 2018-6-24 15:33:47 | 显示全部楼层
怎么解决的,想看看
发表于 2018-7-30 15:07:09 | 显示全部楼层
看看  怎麼解決的
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-3-29 02:19 , Processed in 0.076347 second(s), 20 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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