Help with WndProc override in .NET Visual C++ 2005

I have inherited from ...::UserControl and have a need to capture private window messages.

I have been all over the Internet and tried everything and have found no means to override virtual WndProc. My latest definition looks like ...

protected: System::Void WndProc(System::Windows::Forms::Message m)
{
__super::WndProc(m);

}

... where from the debugger I am sitting on__super::WndProc(m); to see if the break point catches. Breakpoints elsewhere in the code catch just fine, but no definition of WndProc seems to allow for an override. Any suggestions?

[781 byte] By [bxs122] at [2007-12-16]
# 1
bxs122 wrote:
I have inherited from ...::UserControl and have a need to capture private window messages.

I have been all over the Internet and tried everything and have found no means to override virtual WndProc. My latest definition looks like ...

protected: System::Void WndProc(System::Windows::Forms::Message m)
{
__super::WndProc(m);
}

... where from the debugger I am sitting on __super::WndProc(m); to see if the break point catches. Breakpoints elsewhere in the code catch just fine, but no definition of WndProc seems to allow for an override. Any suggestions?


Problem is resolved -- the correct syntax is:

protected:
virtual void WndProc(System::Windows::Forms::Message% m) override
{
__super::WndProc(m);
}

bxs122 at 2007-9-9 > top of Msdn Tech,Windows Forms,Windows Forms General...