Commit 31e98290 authored by Alexander Nicolaysen Sørnes's avatar Alexander Nicolaysen Sørnes Committed by Alexandre Julliard

wordpad: Disable copy/cut in menu when appropriate.

parent 886d8048
......@@ -778,6 +778,11 @@ static LRESULT OnInitPopupMenu( HWND hWnd, WPARAM wParam, LPARAM lParam )
PARAFORMAT pf;
int nAlignment = -1;
REBARBANDINFOW rbbinfo;
int selFrom, selTo;
SendMessageW(hEditorWnd, EM_GETSEL, (WPARAM)&selFrom, (LPARAM)&selTo);
EnableMenuItem(hMenu, ID_EDIT_COPY, MF_BYCOMMAND|(selFrom == selTo) ? MF_GRAYED : MF_ENABLED);
EnableMenuItem(hMenu, ID_EDIT_CUT, MF_BYCOMMAND|(selFrom == selTo) ? MF_GRAYED : MF_ENABLED);
pf.cbSize = sizeof(PARAFORMAT);
SendMessageW(hwndEditor, EM_GETPARAFORMAT, 0, (LPARAM)&pf);
......
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