找回密码
 加入
搜索
查看: 1464|回复: 2

[GUI管理] 【已解决】GUICtrlCreateMenuItem如何再创建下一级菜单

[复制链接]
发表于 2017-1-4 16:26:54 | 显示全部楼层 |阅读模式
本帖最后由 CFL875801950 于 2017-1-5 16:55 编辑

GUICtrlCreateMenu可以创建GUICtrlCreateMenuItem,那GUICtrlCreateMenuItem如何创建下一级菜单呢,例如GUICtrlCreateMenu创建菜单123,GUICtrlCreateMenuItem在123菜单里面创建菜单456,我现在如何在456里面创建789和012两个菜单呢?
发表于 2017-1-4 19:57:14 | 显示全部楼层
koda 里面就可以弄好的.
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form2 = GUICreate("窗体1", 413, 305, 302, 218)
$Button1 = GUICtrlCreateButton("Button1", 64, 64, 89, 41)
$Button1context = GUICtrlCreateContextMenu($Button1)
$MenuItem3 = GUICtrlCreateMenu("MenuItem3", $Button1context)
$MenuItem4 = GUICtrlCreateMenu("MenuItem4", $MenuItem3)
$MenuItem5 = GUICtrlCreateMenuItem("MenuItem5", $MenuItem4)
$MenuItem2 = GUICtrlCreateMenu("MenuItem2", $Button1context)
$MenuItem6 = GUICtrlCreateMenuItem("MenuItem6", $MenuItem2)
$MenuItem1 = GUICtrlCreateMenuItem("MenuItem1", $Button1context)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

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

        EndSwitch
WEnd
 楼主| 发表于 2017-1-5 16:53:07 | 显示全部楼层

【已解决】GUICtrlCreateMenuItem如何再创建下一级菜单

本帖最后由 CFL875801950 于 2017-1-5 16:55 编辑

回复 2# Alam


    谢谢,在您的帮助下,我已经达到了我想要的效果了
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-4-27 07:39 , Processed in 0.071778 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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