(This is C# btw)
I have a subclass that handles UDP operations from an external SimuLink application, but I don't want this subclass to be a form. Just something that opens another SimConnect connection to transmit/set information.
As I understand it, DefWndProc is a method of Forms, so how do I register this connection to receive messages?
I get an exception ('no suitable method to override') because this is not a Form.
Do I not need this then if this is running as essentially a console application? I'm slightly confused.
I have a subclass that handles UDP operations from an external SimuLink application, but I don't want this subclass to be a form. Just something that opens another SimConnect connection to transmit/set information.
As I understand it, DefWndProc is a method of Forms, so how do I register this connection to receive messages?
I get an exception ('no suitable method to override') because this is not a Form.
Code:
protected override void DefWndProc(ref Message m)
{
if (m.Msg == WM_USER_SIMCONNECT)
{
if (simConnectRecv != null)
{
simConnectRecv.ReceiveMessage();
}
}
else
{
base.DefWndProc(ref m);
}
}
Do I not need this then if this is running as essentially a console application? I'm slightly confused.


