如题,多谢

解决方案 »

  1.   

    Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
    Private Declare Function GetMenu Lib "user32" (ByVal hwnd As Long) As Long
    Private Declare Function GetSubMenu Lib "user32" (ByVal hMenu As Long, ByVal nPos As Long) As Long
    Private Declare Function DeleteObject Lib "gdi32" (ByVal hObject As Long) As Long
    Private Declare Function GetMenuString Lib "user32" Alias "GetMenuStringA" (ByVal hMenu As Long, ByVal wIDItem As Long, ByVal lpString As String, ByVal nMaxCount As Long, ByVal wFlag As Long) As Long
    Private Declare Function GetMenuItemCount Lib "user32" (ByVal hMenu As Long) As Long
    用以上的函数遍历
      

  2.   

    哈哈,我也是这么做的,兄弟想到一块去了。
    我的是用权限表,有一个parent字段,parent字段里保存的就是上一级的菜单名。
      

  3.   

    是这样,我定义的菜单有索引,索引项和菜单的NAME是主键(权限表的)
    用api没办法得到这些东东啊
      

  4.   

    GetMenuString得到的就是菜单名称