Hippocrates Sendoukas : riched20:
WM_CONTEXTMENU fix for custom context menus.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Sep 7 09:20:21 CDT 2006
Module: wine
Branch: master
Commit: 0ad5638bf14677b7ec0b5a7497c85262d116c8f2
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=0ad5638bf14677b7ec0b5a7497c85262d116c8f2
Author: Hippocrates Sendoukas <hsendoukas at hotmail.com>
Date: Sat Sep 2 20:08:46 2006 -0700
riched20: WM_CONTEXTMENU fix for custom context menus.
---
dlls/riched20/editor.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/dlls/riched20/editor.c b/dlls/riched20/editor.c
index fa43e1f..4ea6cc0 100644
--- a/dlls/riched20/editor.c
+++ b/dlls/riched20/editor.c
@@ -1077,13 +1077,13 @@ ME_KeyDown(ME_TextEditor *editor, WORD n
return FALSE;
}
-static void ME_ShowContextMenu(ME_TextEditor *editor, int x, int y)
+static BOOL ME_ShowContextMenu(ME_TextEditor *editor, int x, int y)
{
CHARRANGE selrange;
HMENU menu;
int seltype = 0;
if(!editor->lpOleCallback)
- return;
+ return FALSE;
ME_GetSelection(editor, (int *)&selrange.cpMin, (int *)&selrange.cpMax);
if(selrange.cpMin == selrange.cpMax)
seltype |= SEL_EMPTY;
@@ -1099,6 +1099,7 @@ static void ME_ShowContextMenu(ME_TextEd
TrackPopupMenu(menu, TPM_LEFTALIGN | TPM_RIGHTBUTTON, x, y, 0, GetParent(editor->hWnd), NULL);
DestroyMenu(menu);
}
+ return TRUE;
}
ME_TextEditor *ME_MakeEditor(HWND hWnd) {
@@ -2335,7 +2336,8 @@ LRESULT WINAPI RichEditANSIWndProc(HWND
ME_SelectWord(editor);
break;
case WM_CONTEXTMENU:
- ME_ShowContextMenu(editor, (short)LOWORD(lParam), (short)HIWORD(lParam));
+ if (!ME_ShowContextMenu(editor, (short)LOWORD(lParam), (short)HIWORD(lParam)))
+ goto do_default;
break;
case WM_PAINT:
if (editor->bRedraw)
More information about the wine-cvs
mailing list