How to handle WndProc messages in WPF?

前端 未结 9 1023
不知归路
不知归路 2020-11-22 10:46

In Windows Forms, I\'d just override WndProc, and start handling messages as they came in.

Can someone show me an example of how to achieve the same thi

9条回答
  •  -上瘾入骨i
    2020-11-22 11:11

    WPF doesn't operate on WinForms type wndprocs

    You can host an HWndHost in an appropriate WPF element then override the Hwndhost's wndproc, but AFAIK that's as close as you're going to get.

    http://msdn.microsoft.com/en-us/library/ms742522.aspx

    http://blogs.msdn.com/nickkramer/archive/2006/03/18/554235.aspx

提交回复
热议问题