wordpad: Disable copy/cut in menu when appropriate.

This commit is contained in:
Alexander Nicolaysen Sørnes 2007-07-04 14:14:02 +02:00 committed by Alexandre Julliard
parent 886d804854
commit 31e9829017

View file

@ -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);