In a WPF application (C#), one of the elements is Win32 Window, created by overriding the HwndHost class. There are about 10 instance of this Win32 window in the WPF at any given time. One should render completely (works fine), and the other 9 should only show previews, without creating a Win32 window, just a bitmap.
I've been trying to find way to generate said bitmap. Tried a lot of different things but nothing has really worked so far. The main problem I run into is that HwndHost.WndProc is only called when the window is visible.
I can take a screenshot of a visible window, render it to memory and create a bitmap fine.. I just need some way of doing this while the window is not visible.
My understanding is still quite fuzzy, so any insight is appreciated.