o
k
q
u
e
s
t
i
o
n
s
.
c
o
m

Using APIs to Create submenu or submenu array -

I know the code to create a popupmenu and fill it with items. Here is the code:
Code:
Public Declare Function CreatePopupMenu Lib "user32.dll" () As Long
Public Type MENUITEMINFO
    cbSize As Long
    fMask As Long
    fType As Long
    fState As Long
    wID As Long
    hSubMenu As Long
    hbmpChecked As Long
    hbmpUnchecked As Long
    dwItemData As Long
    dwTypeData As String
    cch As Long
End Type
Public Declare Function InsertMenuItem Lib "user32.dll" Alias "InsertMenuItemA" (ByVal _
    hMenu As Long, ByVal uItem As Long, ByVal fByPosition As Long, lpmii As _
    MENUITEMINFO) As Long



    Dim hPopupMenu As Long    
    Dim mii As MENUITEMINFO 
    Dim retval As Long        


'inside an event procedure

  hPopupMenu = CreatePopupMenu()
  With mii
        .cbSize = Len(mii)
        .fMask = MIIM_STATE Or MIIM_ID Or MIIM_TYPE
        .fType = MFT_STRING
        .fState = MFS_ENABLED Or MFS_DEFAULT
        .wID = ID_ABOUT
        .dwTypeData = "&About This Example..."
        .cch = Len(.dwTypeData)
    End With
    retval = InsertMenuItem(hPopupMenu, 0, 1, mii)
This will produce an menu item for popupmenu. But I tried to change the ftype, fmask value to create submenu or submenu array within popupmenu without success.
Anyone could help me?





 

pullout to submenu item pulled out by arrow -
I've spotted a solution to this before but can't seem to find it again. How do I add a submenu item that will have an arrow beside it which, when I hover the mouse over, the submenu item pulls out a new menu. The VB IDE is full of them. Eg. Edit>Table. I also need that submenu


Creating submenus at runtime -
Hi I have a popup menu on a system tray icon. One of the menu items opens a submenu listing some filenames in a directory. I'm looking to expand this to include folders within the directory, which will in turn expand into another submenu listing the files within those folders.


How to create a submenu on rightclick event -Solved -
Hi, I want to create this submenu on rightclick even look at this pic Is there anyway to sedmessage to the click event, l have done this type of thing like on a regular menu using GetMenuItemID but how to do it in a highlighted item which by clicking on the right buttom u ge


subMenu -
i am just a moron, but how do you create a submenu on a menu, doesnt even need to be at run time. Thanks


How to create dynamic sub subMenu -
How to create dynamic sub subMenu Hi, I want to be able to create a dynamic menu with submenus that have submenu... For example MENU --Group1 ----A1 ----B1 --Group2 --Group3 ----A3 ----B3 I already put mnuGroup with index(0) in design with mnuSubGroup with index(


Submenu Items -
Hi all This is probably a really easy question, and i can solve it using APIs but i hope for a simplier way. Normally when creating new menu items you can make an array then load new menu items as you need. Now what i need to do is add submenus to menus. I'm adding plugins to one o


Add a submenu to a submenu -
I have my root and then my submenu and then I want to add the addition of another level from there so it looks like this: Level1 -> Level2 -> Level3 -> Level2 -> Level3 -> Level3 Please see attached zip to see the co


How to add popup menu to Outlook submenu from VB6 -
Hi I want to add a popup menu to Outlook submenu using VB6.I already add a submenu to Outlook Tools menu,now i want to add popup menu to already added submenu.Please give me a solution for that,thanks in advance. Mamatha


PopMenu_SubMenu -
I want to create a submenu inside of the Popmenu (is the menu which appears when the user press the right button of the mouse) Component. I use the SWBPopmenu.ocx , which doesn’t support the ability of the creation of submenu. It will be for me great help if someone of us could give


Spry submenu dropdown not aligned in IE 7 only -
I am working with Dreamweaver CS3 and the Spry navigation menu. I seem to have figured most of it out but now I have come to a part that I am getting stumped with. In IE 7, it seems like the submenu is over too far and also the popout of the submenu is covering part of the submenu. I l


Adding a submenu in runtime -
How to do: Use clicks command1 a new submenu is created in the menu


XP and Menus (anything different) -
An application I wrote gives the user the ability to select one of 20 different date formats. The Menu Item mnuDateTime has 20 subMenu Items mnuDateFormat (indexed 1 thru 20). When the app is first run, I do not read the .INI and check the appropriate subMenu item, I simply set a g


Using APIs to Create submenu or submenu array -
I know the code to create a popupmenu and fill it with items. Here is the code: Code: Public Declare Function CreatePopupMenu Lib "user32.dll" () As Long Public Type MENUITEMINFO cbSize As Long fMask As Long fType As Long fState As Long wID As


check submenu -
i have two submenu 1. decimal 2. degree i want to let user select the decimal or degree by checked. only one of the submenu can check each time. the title(decimal/degree) which is checked will show in a text box. how to write the code?


submenus -
Let’s say I want to write an application with which a user can store information about members of his own family tree. I want this user to be able to navigate quickly to any individual on this tree by menu-submenu selection because it is quicker than using a series of combo boxes. I


Which submenu is clicked on -
Hello there... I got a small problem. I need to know which of the submenus the user clicks on. It´s not hard if I wouldn´t need to create the submenu in the code. I create the submenus in the code with the code that is shown under. Anyone know how I can find which submenu that


one form to unload another form -
Hi everyone, i'am doing a little app for a buddy abd have hit a snag. the problem is that im using a usermade form based menu system. i'm on the submenu side, Problem, i need the main menu to pass itself to the submenu so the submenu can unload the main menu after its unloaded


Click Menu Item by Index -
I have the index number of a menuitem in a submenu, and the handle of the submenu, so now how can I click that menu item? Do I need to use SendMessage? Do I need to get the handle of the menuitem?? Its all done through code, so Im not "clicking the menu items" individually


menu and submenu in different frams -
hi guys i have a problem in this situation and i don't know how to do it couse i'm new in webprogramming field i have 2 frames one of them will contain menu and the submenu and the other frame will have the page of each submenu what i need that when i put the mouse in the men


Open a new window with every submenu -
Hi, I have a menu with many submenus. Now what I can't figure out is how I can get a different window containing a couple of images and text for every submenu. I need to change only the window in the middle part of the page whilst keeping the side slide menu etc . Can somebo


Menu - add a submenu to a submenu -
I have my root level and then my submenu and then I want to add the addition of another level from there so it looks like this: Level1 -> Level2 -> Level3 -> Level2 -> Level3 -> Level3 I want to know how to ad


How To differentiate Menu And SubMenu -
I Donn't Know How To Differentiate The Menu And The SubMenu Of VBForm? Who Know? Cound Tell Me? In Here Thank You First!


How to add a submenu item at runtime -
Hi I have created a menu bar using menu editor. I am adding more menu items ar run time to one of the menu items depending on a information read from a text file. I also need to add 3 submenus to the last menu item at run time. I can add the menu items at run time but not the subme


dhtml question. hard and frustrating. please help. -
im usin a dhtml to create a cool menu on a webpage. but whenever i try to put something like a image next to it the the image will go in the same place as the dhtml menu forcing one to cover up the other. im using dreamweaver to make this. i need the image or text to be next to the me


checked state on menuItems -
I need to have my submenu stay open like it is when the user checks or unchecks a submenu item. Right now, when they do click to toggle the checked state, it simply closes all of the menus. How can I code it to stay open?


Creating Sub-Sub-Menu of Ms Access -
Hey Guys, Im just little stuck on this... Could anly so kindly help me? Hi guys, How can I make a sub-sub menu in MS Access? I have "MAIN MENU" and under it is the submenu "My Menu" then under it is "Own Menu". How can I do to make a sub-sub-


Dynamic submenus -
I want to create dynamic submenus, but I don't even know where to begin. At runtime, how can I create multiple new submenus under, say, the File Menu, add items to them, and have event handlers for them? The code to handle each menu item in the dymanic submenus will be generic and s


Context Menu in NT -
Hi, I am making a submenu in context menu of the explorer. For that I am using the API calls for InsertMenu etc. The code is working fine for all the OS except Windows NT. In NT it makes the submenu and the icon associated with the menu but the text of the menu does not appears. E


Hover won't open submenu -
I've got a typical menu built with first row commands (ie the classic File, Edit, View etc), with menu commands under the first row commands. Some of the commands have sub-menus under them (for example: View->Screen Elements->list of choices...). When I build the form, the items


Tray popup crashes user.exe -
I'm using the MouseMove on a Form to sense when to show a popup menu from the tray icon. If the menu is simple, there is no problem. But if the menu has more than 1 submenu, clicking on a submenu usually causes a GPF in user.exe. This happens in VB4 and VB5, in the exe and in the VB en


VB IDE - Dockable Project Window PopupMenu - 'ADD' submenu disappeared -
After adding an add-in to my VB IDE, the add submenu for the Dockable Project Window menu disappeared. Before this, I used to add objects to the project by just right-clicking any folder or file in the dockable window, now that submenu (ADD..) just appears when I click the yellow f


Hooking menu -
Hi experts! I did this: http://www.vbforums.com/showpost.php...39&postcount=1 Everything worked fine. Except for 1 thing. When I add a submenu in a program(in this case Swift 3D) the submenu is disabled When I do it with notepad, everything works fine! thanx


Vertical Menu - onmouseout bubbling -
I am having major difficulties with this. The objective is to create a stacked, inline vertical menu. Upon mousing over a menu option, a series of sublinks (children) presents itself immediately beneath the parent. The children push the rest of the menu options downward. We're ok up t


Searching for Menu Control Name -
How can I find the control name for a menu option, when I know a control which is a submenu option? Example: Quote: Menu Option: "System" Menu Control: mnuSystem Submenu Option: "Compact DB" Submenu Control: smnCompactDB


Menu disabled -
Hi experts! I did this: http://www.vbforums.com/showpost.php...39&postcount=1 Everything worked fine. Except for 1 thing. When I add a submenu in a program(in this case Swift 3D) the submenu is disabled When I do it with notepad, everything works fine! thanx


Problems with Popup menus... -
Hi all. I seem to have a problem using popup menus. I get an error whenever I want to display a specific popup menu. The error says something about the fact that "at least on submenu must belong to the menu selected" or something like that. I DO have a submenu in the me


Program disappears when Tray Icon is clicked -
I have a program that when executed, it puts an Icon with a submenu in the Systray. However, when I right click the icon the submenu pops up. When I click a menu option...my program loses focus and disappears. This program contains only 1 form and that form is what comes up when execut


Sub Menus -
Can Someone Teach Me How To Make A SubMenu EDIT:::: O and does neone no how to create a horisontal rules


Add SubMenus at run-time -
I need add a submenu at run-time in my application. I studied the API AppendMenu resource. This function need 4 parameters: hMenu (the handle to menu to be changed), wFlags (menu-item flags), wIDNewItem (menu-item identifier or handle of drop-down menu or submenu) and lpNewItem (menu-i


css driven menu help -
ok i am having problems trying to create a simple ul menu with css exp: HTML Code: <ul class="menu"> <li><a href="/">Test link #1</a> <ul> <li><a href="/">Submenu link #1</