can't disable ctrl-V on a rich edit control

This is a discussion on can't disable ctrl-V on a rich edit control within the Windows Programming forums, part of the Platform Specific Boards category; Hi there,
I am trying to disble the Ctrl-V key function for a rich edit control. I set the ENM_KEYEVENTS ...

This code fails to prevent the Ctrl-V button from pasting into the rich edit control. I know that the if statement is being executed because I get a message but I still get the text pasted into the rich edit control. What am I doing wrong?