riched20: Call GetClipboardData callback on cut/copy.

This commit is contained in:
Kevin Koltzau 2006-02-22 23:09:59 -05:00 committed by Alexandre Julliard
parent 33af76f991
commit 53b74b0d56
1 changed files with 6 additions and 3 deletions

View File

@ -1767,10 +1767,13 @@ LRESULT WINAPI RichEditANSIWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lP
case WM_CUT: case WM_CUT:
case WM_COPY: case WM_COPY:
{ {
LPDATAOBJECT dataObj; LPDATAOBJECT dataObj = NULL;
CHARRANGE range; CHARRANGE range;
HRESULT hr; HRESULT hr = S_OK;
ME_GetSelection(editor, (int*)&range.cpMin, (int*)&range.cpMax); ME_GetSelection(editor, (int*)&range.cpMin, (int*)&range.cpMax);
if(editor->lpOleCallback)
hr = IRichEditOleCallback_GetClipboardData(editor->lpOleCallback, &range, RECO_COPY, &dataObj);
if(FAILED(hr) || !dataObj)
hr = ME_GetDataObject(editor, &range, &dataObj); hr = ME_GetDataObject(editor, &range, &dataObj);
if(SUCCEEDED(hr)) { if(SUCCEEDED(hr)) {
hr = OleSetClipboard(dataObj); hr = OleSetClipboard(dataObj);