Dim Gm As Long
Dim Im As Long
Dim Flag As Long
hWnd1 = FindWindow(vbNullString, "未定标题 - 记事本")
Gm = GetMenu(hWnd1)
Im = IsMenu(Gm)
If Im <> 0 Then
   InsertMenu Gm, 2, MF_BYPOSITION, 2, "MyMenu"
   InsertMenu GetSubMenu(Gm, 0), 0, MF_BYPOSITION, 1, "MyMenu0"
   InsertMenu GetSubMenu(Gm, 0), 1, MF_BYPOSITION, 2, "MyMenu1"
   InsertMenu GetSubMenu(Gm, 0), 2, MF_BYPOSITION, 1, "MyMenu2"
   
End If 
这个就是插入菜单,子菜单的代码 .但是我现在没有办法实现二个地方: (1)对插入到主菜单里的菜单项“MyMenu”,怎样才能插入一个子菜单?(很奇怪,对原有的菜单进行插入都没有问题,但是对自己生成的菜单就不能插入子菜单) 
今夜无眠 01:35:57
(2)对插入的菜单项或者子菜单项,如何实现点击的方法?(就是用鼠标点击它时有反应) 怎么办?请教!!!!!!谢谢先!!!!!!!!!!!!!!!!!!!!