【发布时间】:2012-11-14 01:44:55
【问题描述】:
我有一个 MFC 应用程序,我想使用 Direct2D 来绘制我的自定义控件。
我需要我的控件是透明的。我曾经通过欺骗 OnEraseBkgnd 并调用 afxGlobalData.DrawParentBackground 来欺骗我的控件是透明的。
对于 Direct2D,我使用 ID2D1HwndRenderTarget 并从 OnPaing 方法调用 BeginDraw/EndDraw。问题是即使没有调用任何绘图/清除函数,此方法也会将整个区域清除为黑色。
有没有办法在 Direct2D 中绘制透明图像???
谢谢!
【问题讨论】:
标签: mfc controls transparent direct2d