Click or drag to resize
IFlightSimulatorXIsSimConnectMessage Method
Returns true if the Windows message is a SimConnect message from Flight Simulator X.

Namespace: VirtualRadar.Interface.FlightSimulatorX
Assembly: VirtualRadar.Interface (in VirtualRadar.Interface.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
bool IsSimConnectMessage(
	Message message
)

Parameters

message
Type: System.Windows.FormsMessage

Return Value

Type: Boolean
True if the message is a SimConnect message, false if it is not.
Remarks
You will need to have an open form for SimConnect / Flight Simulator X to send messages to. Override the DefWndProc method on the form and then pass every message that comes into the form to this method. If this method returns true then throw the message away, otherwise pass it on for normal processing.
Examples
protected override void DefWndProc(ref Message m)
{
    if(!_FlightSimulatorX.IsSimConnectMessage(m)) base.DefWndProc(ref m);
}
See Also