Mercurial > hg > easyhg-kdiff3
comparison kdiff3/src-QT4/kreplacements/ShellContextMenu.cpp @ 112:0180c7f92563
Build fixes
author | Chris Cannam |
---|---|
date | Fri, 07 Dec 2018 13:40:01 +0000 |
parents | 1184fc843210 |
children |
comparison
equal
deleted
inserted
replaced
111:44fa471eb3c4 | 112:0180c7f92563 |
---|---|
146 } | 146 } |
147 | 147 |
148 | 148 |
149 UINT CShellContextMenu::ShowContextMenu(QWidget * pParentWidget, QPoint pt, QMenu* pMenu ) | 149 UINT CShellContextMenu::ShowContextMenu(QWidget * pParentWidget, QPoint pt, QMenu* pMenu ) |
150 { | 150 { |
151 HWND hWnd = pParentWidget->winId(); | 151 HWND hWnd = (HWND)pParentWidget->winId(); |
152 int iMenuType = 0; // to know which version of IContextMenu is supported | 152 int iMenuType = 0; // to know which version of IContextMenu is supported |
153 LPCONTEXTMENU pContextMenu; // common pointer to IContextMenu and higher version interface | 153 LPCONTEXTMENU pContextMenu; // common pointer to IContextMenu and higher version interface |
154 | 154 |
155 if (!GetContextMenu ((void**) &pContextMenu, iMenuType)) | 155 if (!GetContextMenu ((void**) &pContextMenu, iMenuType)) |
156 return (0); // something went wrong | 156 return (0); // something went wrong |
185 g_IContext3 = (LPCONTEXTMENU3) pContextMenu; | 185 g_IContext3 = (LPCONTEXTMENU3) pContextMenu; |
186 } | 186 } |
187 else | 187 else |
188 OldWndProc = NULL; | 188 OldWndProc = NULL; |
189 | 189 |
190 UINT idCommand = TrackPopupMenu (m_hMenu,TPM_RETURNCMD | TPM_LEFTALIGN, pt.x(), pt.y(), 0, pParentWidget->winId(), 0); | 190 UINT idCommand = TrackPopupMenu (m_hMenu,TPM_RETURNCMD | TPM_LEFTALIGN, pt.x(), pt.y(), 0, (HWND)pParentWidget->winId(), 0); |
191 | 191 |
192 if (OldWndProc) // unsubclass | 192 if (OldWndProc) // unsubclass |
193 SetWindowLong (hWnd, GWL_WNDPROC, (DWORD) OldWndProc); | 193 SetWindowLong (hWnd, GWL_WNDPROC, (DWORD) OldWndProc); |
194 | 194 |
195 if (idCommand >= MIN_ID && idCommand <= MAX_ID) // see if returned idCommand belongs to shell menu entries | 195 if (idCommand >= MIN_ID && idCommand <= MAX_ID) // see if returned idCommand belongs to shell menu entries |