문제

I have a WPF application and a MFC application. I want to do a two communication between them. I can use SendMessage in mfc application to send messages to WPF application. How can I do the same in WPF application?

도움이 되었습니까?

해결책

If you can do it in MFC, then you can do it in C# too by importing the SendMessage API call:

[DllImport("user32.dll", CharSet = CharSet.Auto)]
static extern IntPtr SendMessage(IntPtr hWnd, UInt32 Msg, IntPtr wParam, StringBuilder lParam);

You can find sample usage of SendMessage in this link.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top