New MFC 2010 classes: D2D1::ColorF::Red gives blue and D2D1::ColorF::Blue gives red - by Mike

Status : 

  Fixed<br /><br />
		This item has been fixed in the current or upcoming version of this product.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 632888 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 12/21/2010 8:28:46 PM
Access Restriction Public


at the bottom of this page,
Ajay correctly points out that there is a bug in the MFC classes to create color, i.e. if you use the instructions but instead of using black as the color you use red, i.e.

m_pBlackBrush = new CD2DSolidColorBrush(GetRenderTarget(), D2D1::ColorF::Red);

then the text comes out as blue instead of red.
Sign in to post a comment.
Posted by Mike on 1/4/2011 at 3:51 PM
For the benefit of others (I've been informed of this privately by Microsoft), this was not a bug in MFC, it was an error in the sample code included in the walkthrough article. The sample code should have said:

m_pBlackBrush = new CD2DSolidColorBrush(GetRenderTarget(), D2D1::ColorF(D2D1::ColorF::Black));
Posted by Microsoft on 12/22/2010 at 10:21 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(