func OnWndButtonUp(nFlags uint32, pPt *xcgui.POINT, pbHandled *bool) int { pt := *pPt hMenu := xcgui.XMenuCreate() xcgui.XMenuAddItem(hMenu, 201, xcgui.StringToUTF16Ptr("窗格1"), xcgui.NULL, xcgui.NULL) xcgui.XMenuAddItem(hMenu, 202, xcgui.StringToUTF16Ptr("窗格2"), xcgui.NULL, xcgui.NULL) xcgui.XMenuAddItem(hMenu, 203, xcgui.StringToUTF16Ptr("窗格3"), xcgui.NULL, xcgui.NULL) xcgui.ClientToScreen(xcgui.XWndGetHWND(mw), &pt) xcgui.XMenuPopup(hMenu, xcgui.XWndGetHWND(mw), pt.X, pt.Y, xcgui.NULL, xcgui.NULL) return 0 }
func (wb *WindowBase) Handle() xc.HWND { wb.hWnd = xc.XWndGetHWND(wb.hWindow) return wb.hWnd }