You did not declare the method to override. You tell the compiler you are declaring it for the first time and with
virtual you indicate it could be overridden using
override.
Try this:
public ref class MyMessageFilter : System::Windows::Forms::IMessageFilter{public: MyMessageFilter(){ }
override bool PreFilterMessage(Message^objMessage) override{
return objMessage->WParam.ToInt32() == 27;
}
};
http://msdn.microsoft.com/en-us/library/9fkccyh4(VS.71).aspx[
^]
Good luck!