Javascript code:
var MF_CHECKED = 0x8;
var MF_APPEND = 0x100;
var MF_GRAYED = 0x1;
var MF_SEPARATOR = 0x800;
var MF_STRING = 0x0;
// don't need the rest...
var MCOWMnu = Interop.Call("user32", "CreatePopupMenu");
Interop.Call("user32", "AppendMenuW", MCOWMnu, MF_GRAYED, 0, "Normal");
Interop.Call("user32", "AppendMenuW", MCOWMnu, MF_CHECKED, 0, "Checked");
Interop.Call("user32", "AppendMenuW", MCOWMnu, MF_SEPARATOR, 0, 0);
Interop.Call("user32", "AppendMenuW", MCOWMnu, MF_STRING, 0, "Disabled");
But is there a way to make a sub-menu?
quote:
Originally posted by MSDN
MF_POPUP: Specifies that the menu item opens a drop-down menu or submenu. The uIDNewItem parameter specifies a handle to the drop-down menu or submenu. This flag is used to add a menu name to a menu bar, or a menu item that opens a submenu to a drop-down menu, submenu, or shortcut menu.
Does that open a menu, close a menu, insert an existing menu or what?
EDIT: seems that MF_POPUP is 0x10, but now what?