My WPF application has more than one window, I need to be able to get the hWnd of each Window instance so that I can use them in Win32 API calls.
Example of what I would like to do:
Window myCurrentWindow = Window.GetWindow(this);
IntPtr myhWnd = myCurrentWindow.hWnd; // Except this property doesn't exist.
What's the best way to do this?