<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : CXTPPropertyGridItemColor and No Fill</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Property Grid : CXTPPropertyGridItemColor and No Fill]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sun, 19 Apr 2026 05:49:24 +0000</pubDate>
  <lastBuildDate>Fri, 18 Jun 2004 12:03:35 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=861</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[CXTPPropertyGridItemColor and No Fill : I ended up modifing CXTPPropertyGridItemColor...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=861&amp;PID=2261&amp;title=cxtppropertygriditemcolor-and-no-fill#2261</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=504">AliRafiee</a><br /><strong>Subject:</strong> 861<br /><strong>Posted:</strong> 18 June 2004 at 12:03pm<br /><br /><P>I ended up modifing <FONT size=2>CXTPPropertyGridItemColor in order to solve the problem. If </FONT><FONT size=2>anyone knows a better way please let me know.</FONT></P><P><FONT size=2>Ali</FONT></P><P><FONT size=2>I have defined No fill as 0xFFFFFFFF, and made the following changes:</FONT></P><P>//Draw a box with an X for No Fill</P><P>BOOL CXTPPropertyGridItemColor::OnDrawItemValue(CDC&amp; dc, CRect rcValue)<BR>{<BR>&nbsp;&nbsp; COLORREF clr = GetColor();<BR>&nbsp;&nbsp; CRect rcSample(rcValue.left - 2, rcValue.top + 1, rcValue.left + 18, rcValue.bottom);<BR>&nbsp;&nbsp; if (clr == 0xFFFFFFFF)<BR>&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CXTPPenDC pen(dc, RGB(0,0,0));<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dc.Rectangle(rcSample);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dc.MoveTo(rcSample.left+1,rcSample.top+1);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dc.LineTo(rcSample.right-1,rcSample.bottom-1);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dc.MoveTo(rcSample.right-1,rcSample.top+1);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dc.LineTo(rcSample.left+1,rcSample.bottom-1);<BR>&nbsp;&nbsp; }<BR>&nbsp;&nbsp; else<BR>&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CXTPPenDC pen(dc, clr);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CXTPBrushDC brush(dc, m_clrValue);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dc.Rectangle(rcSample);<BR>&nbsp;&nbsp; }<BR>&nbsp;<BR>&nbsp;&nbsp; CRect rcText(rcValue);<BR>&nbsp;&nbsp;&nbsp;rcText.left += 25;</P><P>&nbsp;&nbsp; dc.DrawText( m_strValue, rcText,&nbsp; DT_SINGLELINE|DT_VCENTER);</P><P>&nbsp;&nbsp; return TRUE;<BR>}</P><P><BR>COLORREF CXTPPropertyGridItemColor::StringToRGB(CString str)<BR>{&nbsp;<BR>&nbsp;&nbsp; if (str.CompareNoCase("no fill") == 0)<BR>&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return 0xFFFFFFFF;<BR>&nbsp;&nbsp; }</P><P>&nbsp;&nbsp; CString strRed, strGreen, strBlue;<BR>&nbsp;<BR>&nbsp; &nbsp;AfxExtractSubString(strRed, str, 0, ';');<BR>&nbsp; &nbsp;AfxExtractSubString(strGreen, str, 1, ';');<BR>&nbsp;&nbsp; AfxExtractSubString(strBlue, str, 2, ';');</P><P>&nbsp;&nbsp; return RGB(__min(_ttoi(strRed), 255), __min(_ttoi(strGreen), 255), __min(_ttoi(strBlue), 255));<BR>}</P><P>CString CXTPPropertyGridItemColor::RGBToString(COLORREF clr)<BR>{<BR>&nbsp;&nbsp; if (clr == 0xFFFFFFFF)<BR>&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return "No Fill";<BR>&nbsp;&nbsp; }</P><P>&nbsp;&nbsp; CString str;<BR>&nbsp;&nbsp; str.Format(_T("%i; %i; %i"), GetRValue(clr), GetGValue(clr), GetBValue(clr));<BR>&nbsp;&nbsp; return str;<BR>}<BR><FONT size=2></P></FONT>]]>
   </description>
   <pubDate>Fri, 18 Jun 2004 12:03:35 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=861&amp;PID=2261&amp;title=cxtppropertygriditemcolor-and-no-fill#2261</guid>
  </item> 
  <item>
   <title><![CDATA[CXTPPropertyGridItemColor and No Fill : I am trying to use a CXTPPropertyGridItemColor...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=861&amp;PID=2260&amp;title=cxtppropertygriditemcolor-and-no-fill#2260</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=504">AliRafiee</a><br /><strong>Subject:</strong> 861<br /><strong>Posted:</strong> 18 June 2004 at 10:01am<br /><br /><P>I am trying to use a <FONT size=2>CXTPPropertyGridItemColor for a fill color property.&nbsp; In the OnInplaceButtonDown method I create a <FONT size=2>CXTColorPopup derived class with the <FONT size=2>CPS_XT_NOFILL style.&nbsp; Within that class I catch the <FONT size=2>CPN_XT_SELNOFILL message. Here is where I am having problems. What value would I set the CXTPPropertyGridItemColor's value to in order for the grid item to display a no color indicator?</FONT></FONT></FONT></FONT></P><P><FONT size=2>Thanks</FONT></P><P><FONT size=2>Ali</FONT></P>]]>
   </description>
   <pubDate>Fri, 18 Jun 2004 10:01:59 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=861&amp;PID=2260&amp;title=cxtppropertygriditemcolor-and-no-fill#2260</guid>
  </item> 
 </channel>
</rss>