1

I am working in a MFC project and I started to migrate the UI to WPF, but I stack on this part,

Is it possible WPF use the MFC OnDraw(CDC* pDC) to render the image?

HudsonPH
  • 1,767
  • 2
  • 21
  • 36
  • Probably not practical. [Much of WPF is managed code](https://msdn.microsoft.com/en-us/library/ms750441.aspx). – Jerry Coffin Oct 04 '16 at 15:51
  • but if i return a bitmap from another function maybe a have a chance, yes? – HudsonPH Oct 04 '16 at 16:12
  • 1
    @HudsonPH I guess so, draw into a bitmap in memory and then pass that to WPF to render. [See this for some details of getting the bitmap to WPF](http://stackoverflow.com/questions/9564174/convert-byte-array-to-image-in-wpf) – gbjbaanb Oct 04 '16 at 17:55
  • thanks, I will check and tomorrow i will give a feedback. – HudsonPH Oct 04 '16 at 19:08

0 Answers0