How to get an BITMAP struct from a RenderTargetBitmap in C++/CLI?
问题 I've got a WPF RenderTargetBitmap in C++/CLI and I want to be able to create a BITMAP structure from it to use with BitBlt. I've not worked with BITMAP or RenderTargetBitmap much before, so any thoughts would be great! 回答1: Turns out that it was a little more complicated than simply using CopyPixels. In the C++/CLI managed code, I do the following: virtual BOOL fillBitmap(CDC* dc, CBitmap* bmp) { WPFContainer^ page = getWPFContainer(); // Get a bitmap from the DVE page RenderTargetBitmap ^rtb