- Messages
- 40
- Country
-
Hi, while trying to add a new feature to my KsimSaver, i am struggling to find a way to use DefWndProc in WPF.
this code is from the SDK sample, as that is Windows Forms, this code is not usable for WPF, atleast the Protected override void DefWndProc(ref Message m) {} part. the rest of the simconnect code should work perfectly fine.
If anyone has any tips or ideas on how to implement this in WPF please let me know.
this code is from the SDK sample, as that is Windows Forms, this code is not usable for WPF, atleast the Protected override void DefWndProc(ref Message m) {} part. the rest of the simconnect code should work perfectly fine.
C#:
protected override void DefWndProc(ref Message m)
{
if (m.Msg == WM_USER_SIMCONNECT)
{
if (simconnect != null)
{
simconnect.ReceiveMessage();
}
}
else
{
base.DefWndProc(ref m);
}
}
If anyone has any tips or ideas on how to implement this in WPF please let me know.