• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Visual C++, eliminate copy, cut, paste?

fs5

Lifer
I want to use a CEdit field (MFC) but I want to override the Copy, Cut, and Paste features (basically disable them). How would one go about doing this?
 
I expected a simple solution to this problem, but the only thing I could find was a suggestion to create your own subclass of CEdit and use that on your form. Obviously this is a little trickier than dropping CEdit on your form, as you will have to create the control in code.

This forum entry asks the same question you did and presents a partial solution for implementing the subclass necessary. Basically the subclassed form this person created filters out the common attempts to paste by disabling right mouse button clicks on the control, as well as attempts to use CTRL+V.
 
Originally posted by: Gaunt
I expected a simple solution to this problem, but the only thing I could find was a suggestion to create your own subclass of CEdit and use that on your form. Obviously this is a little trickier than dropping CEdit on your form, as you will have to create the control in code.

This forum entry asks the same question you did and presents a partial solution for implementing the subclass necessary. Basically the subclassed form this person created filters out the common attempts to paste by disabling right mouse button clicks on the control, as well as attempts to use CTRL+V.

I thought the solution would be very simple too! 🙁 I created my own subclass but was trying to overload the Paste() function which of course didn't work. Your linked worked, thanks a billion.
 
Back
Top