if (itemMap.containsKey(item.getId()))
return;
int uFlags = Win32.MF_BYCOMMAND;
if (style == Win32.MF_BYPOSITION)
uFlags = Win32.MF_BYPOSITION;
TCHAR lpNewItem = null;
if ((item.getStyle() & SWT.SEPARATOR) != 0) {
uFlags |= Win32.MF_SEPARATOR;
} else {
uFlags |= Win32.MF_STRING;
lpNewItem = new TCHAR(0, item.getText(), true);
}
Extension2.InsertMenu(hMenu, position, uFlags, item.getId().intValue(),
lpNewItem);
if ((item.getStyle() & SWT.SEPARATOR) == 0) {
item.setEnabled(item.isEnabled());