Menu menubar = frame.getMenubar();
Shell shell = getShell(); Menu menubar = shell.getMenuBar();
private int GetWindowContext(int ppFrame, int ppDoc, int lprcPosRect, int lprcClipRect, int lpFrameInfo) {		if (frame == null || ppFrame == 0)		return COM.E_NOTIMPL;	// fill in frame handle	int iOleInPlaceFrame = frame.getIOleInPlaceFrame();	COM.MoveMemory(ppFrame, new int[] {iOleInPlaceFrame}, 4);	frame.AddRef();	// null out document handle	if (ppDoc != 0) {		COM.MoveMemory(ppDoc, new int[] {0}, 4);	}	// fill in position and clipping info	Rectangle clientArea = this.getClientArea();	Point clientLocation = this.getLocation();	setExtent(clientArea.width - indent.left - indent.right, clientArea.height - indent.top - indent.bottom);		RECT posRect = new RECT();	posRect.left   = clientLocation.x + indent.left;	posRect.top    = clientLocation.y + indent.top;	posRect.right  = clientLocation.x + clientArea.width - indent.right;	posRect.bottom = clientLocation.y + clientArea.height - indent.bottom;	RECT clipRect = new RECT();	Rectangle frameArea  = frame.getClientArea();	clipRect.left   = frameArea.x;	clipRect.top    = frameArea.y;	clipRect.right  = frameArea.x + frameArea.width;	clipRect.bottom = frameArea.y + frameArea.height;		if (lprcPosRect != 0) {		OS.MoveMemory(lprcPosRect, posRect, RECT.sizeof);	}	if (lprcClipRect != 0) {		OS.MoveMemory(lprcClipRect, clipRect, RECT.sizeof);	}	// get frame info	OLEINPLACEFRAMEINFO frameInfo = new OLEINPLACEFRAMEINFO();	frameInfo.cb = OLEINPLACEFRAMEINFO.sizeof;	frameInfo.fMDIApp = 0;	frameInfo.hwndFrame = frame.handle;	Menu menubar = frame.getMenubar();	if (menubar != null && !menubar.isDisposed()) {		Shell shell = menubar.getShell();		int hwnd = shell.handle;		int cAccel = OS.SendMessage(hwnd, OS.WM_APP, 0, 0);		if (cAccel != 0) {			int hAccel = OS.SendMessage(hwnd, OS.WM_APP+1, 0, 0);			if (hAccel != 0) {				frameInfo.cAccelEntries = cAccel;				frameInfo.haccel = hAccel;			}		}	}	COM.MoveMemory(lpFrameInfo, frameInfo, OLEINPLACEFRAMEINFO.sizeof);		return COM.S_OK;}