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?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…