Commit c96dcd77 authored by Martin Fuchs's avatar Martin Fuchs Committed by Alexandre Julliard

Display the system popup menu when clicking with the right mouse

button in the window caption.
parent 83ab5ae5
...@@ -217,15 +217,20 @@ static LRESULT DEFWND_DefWinProc( WND *wndPtr, UINT msg, WPARAM wParam, ...@@ -217,15 +217,20 @@ static LRESULT DEFWND_DefWinProc( WND *wndPtr, UINT msg, WPARAM wParam,
case WM_CONTEXTMENU: case WM_CONTEXTMENU:
if( wndPtr->dwStyle & WS_CHILD ) if( wndPtr->dwStyle & WS_CHILD )
SendMessageA( wndPtr->parent->hwndSelf, msg, wParam, lParam ); SendMessageA( wndPtr->parent->hwndSelf, msg, wParam, lParam );
else else if (wndPtr->hSysMenu)
if (wndPtr->hSysMenu) {
{ /* LONG hitcode;
TrackPopupMenu32(wndPtr->hSysMenu,TPM_LEFTALIGN | TPM_RETURNCMD,LOWORD(lParam),HIWORD(lParam),0,wndPtr->hwndSelf,NULL); POINT16 pt = MAKEPOINT16(lParam);
DestroyMenu32(wndPtr->hSysMenu);
*/ ScreenToClient16(wndPtr->hwndSelf, &pt);
FIXME("Display default popup menu\n"); hitcode = NC_HandleNCHitTest(wndPtr->hwndSelf, pt);
/* Track system popup if click was in the caption area. */
} /* Track system popup if click was in the caption area. */
if (hitcode==HTCAPTION || hitcode==HTSYSMENU)
TrackPopupMenu(GetSystemMenu(wndPtr->hwndSelf, FALSE),
TPM_LEFTBUTTON | TPM_RIGHTBUTTON,
pt.x, pt.y, 0, wndPtr->hwndSelf, NULL);
}
break; break;
case WM_NCACTIVATE: case WM_NCACTIVATE:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment