I create a global hot key to show a window by PInvoking RegisterHotKey(). But to do this I need that window\'s HWND, which doesn\'t exist until the
RegisterHotKey()
HWND
The WindowInteropHelper class should allow you to get the HWND for the WPF window.
MyWindow win = new MyWindow(); WindowInteropHelper helper = new WindowInteropHelper(win); IntPtr hwnd = helper.Handle;
MSDN Documentation