Evan Li
asked on
I could not get notification EN_CLIPFORMAT for RichEdit control
I have richedit control, I would like to know when paste happens. By looking at the MSDN document, I found that there is a message I can use: EM_CLIPFORMAT, but I could not receive this notification. I have specified ENM_CLIPFORMAT in the mask sent with the EM_SETEVENTMASK message.
Does anyone knows why?
Thank you a lot.
Evan
Does anyone knows why?
Thank you a lot.
Evan
ASKER
In fact, I am in Windows 10. I supposed that it will work.
ok - how and where do you handle the message? AFAIK it needs to be handled via a WM_NOTIFY handler in the parent-/ownerwindow.
ASKER
Yes, I do have get the event from parent window for WM_NOTIFY, here is my sample code in MFC:
https://drive.google.com/file/d/0By7VLOEVfVt1TDdWaXVlNjk3S28/view?usp=sharing
Thanks for your help.
Evan
https://drive.google.com/file/d/0By7VLOEVfVt1TDdWaXVlNjk3S28/view?usp=sharing
Thanks for your help.
Evan
Hm, I can't find any thingrelated in the sample project, i.e. no richedit control, no WM_NOTIFY or EN_CLIPFORMAT, looks like a wizard created Win32 project with some minor changes. Are you sure you uploaded the correct project?
ASKER
Sorry.
I might get a wrong file there. Will find out what is wrong.
I might get a wrong file there. Will find out what is wrong.
ASKER
Sorry Zoppo,
I uploaded a wrong file. This file is correct:
https://drive.google.com/file/d/0By7VLOEVfVt1aUtGQUlnMHUxS1E/view?usp=sharing
Thank you for your help.
Evan
I uploaded a wrong file. This file is correct:
https://drive.google.com/file/d/0By7VLOEVfVt1aUtGQUlnMHUxS1E/view?usp=sharing
Thank you for your help.
Evan
Hi,
sorry for the late repsonse, as told I have only Win 7, so I had to find a Win 10 computer to test it.
I even wasn't able yet to get this running, I guess the problem could be the Rich Edit version, you use 2.0 which is quite old, maybe the EN_CLIPFORMAT came with version 3.0 or 4.0. Unfortunateley I wasn't able to find any helpful documentation about this in the internet, and I yet didn't have enough time to try to find out how a Rich Edit control version 3.0 or higher can be used with MFC. I can't promise but I hope I can do some more tests the next some days.
Best regards,
ZOPPO
sorry for the late repsonse, as told I have only Win 7, so I had to find a Win 10 computer to test it.
I even wasn't able yet to get this running, I guess the problem could be the Rich Edit version, you use 2.0 which is quite old, maybe the EN_CLIPFORMAT came with version 3.0 or 4.0. Unfortunateley I wasn't able to find any helpful documentation about this in the internet, and I yet didn't have enough time to try to find out how a Rich Edit control version 3.0 or higher can be used with MFC. I can't promise but I hope I can do some more tests the next some days.
Best regards,
ZOPPO
ASKER
Thank you a lot.
I would think Rich edit version might be the answer, I'll try that.
I would think Rich edit version might be the answer, I'll try that.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
This resolved my problem.
in which environment do you test this? EN_CLIPFORMAT seems to be a quite new notification, at https://msdn.microsoft.com/en-us/library/windows/desktop/hh768385(v=vs.85).aspx you can find it requires Windos 8 or Windows Server 2012.
Even if you're i.e. working in Windows 8 it might be needed to configure your project to target OS Windows 8, maybe some WINVER macros should be defined for Windows 8 either.
ZOPPO