riched20: Call GetClipboardData callback on cut/copy.
This commit is contained in:
parent
33af76f991
commit
53b74b0d56
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue