Menu menubar = frame.getMenubar();
Shell shell = getShell(); Menu menubar = shell.getMenuBar();
private int OnUIDeactivate(int fUndoable) {	// currently, we are ignoring the fUndoable flag	if (frame == null || frame.isDisposed()) return COM.S_OK;	frame.SetActiveObject(0,0);	Menu menubar = frame.getMenubar();	if (menubar == null || menubar.isDisposed())		return COM.S_OK;			int shellHandle = menubar.getShell().handle;	OS.SetMenu(shellHandle, menubar.handle);	return COM.OleSetMenuDescriptor(0, shellHandle, 0, 0, 0);}