First, make sure that your code is in a DLL, message hook procs need to be placed in a DLL. Second, is your code not being called at all, or it is being called, but what you want to happen is not happening? When you do get your code to happen, you will not want to send the message on to the other hooks in the chain. If you want to prevent whatever app that should receive the mouse message from displaying the context menu, the only way to do this is to make sure that they do not receive the message.
Build a man a fire, and he will be warm for a day
Light a man on fire, and he will be warm for the rest of his life!