本文整理汇总了Java中com.sun.jna.platform.win32.WinDef.HMENU类的典型用法代码示例。如果您正苦于以下问题:Java HMENU类的具体用法?Java HMENU怎么用?Java HMENU使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
HMENU类属于com.sun.jna.platform.win32.WinDef包,在下文中一共展示了HMENU类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: buildMenuXmlElements
import com.sun.jna.platform.win32.WinDef.HMENU; //导入依赖的package包/类
public static Element buildMenuXmlElements(Document xmlDoc, Element xmlElement, HMENU targetMenu, String targetWin)
{
MenuInfo firstMi = new MenuInfo(targetWin, targetMenu);
for (int i = 0 ; i < firstMi.menuCount ; i++ ) {
MenuInfo menuInfo = new MenuInfo(targetWin, targetMenu, i);
Element menuElement = xmlDoc.createElement("menu");
menuElement.setAttribute("unaltered", menuInfo.unaltered + "");
menuElement.setAttribute("text", menuInfo.text + "");
menuElement.setAttribute("id", menuInfo.id + "");
menuElement.setAttribute("position", menuInfo.position + "");
menuElement.setAttribute("hmenu", menuInfo.hmenuStr + "");
menuElement.setAttribute("hwnd", menuInfo.hwndStr + "");
if (!menuInfo.center.isEmpty())
menuElement.setAttribute("center", menuInfo.center + "");
if (menuInfo.hasSubMenu) {
buildMenuXmlElements(xmlDoc, menuElement, menuInfo.submenu, targetWin);
}
xmlElement.appendChild(menuElement);
}
return xmlElement;
}
示例2: CreateWindowEx
import com.sun.jna.platform.win32.WinDef.HMENU; //导入依赖的package包/类
HWND CreateWindowEx(int styleEx, String className, String windowName,
int style, int x, int y, int width, int height, HWND parent,
HMENU menu, HINSTANCE instance, Pointer param);