<?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 : CXTPC&#111;ntrolColorSelector</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : CXTPC&#111;ntrolColorSelector]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 15 Apr 2026 00:08:12 +0000</pubDate>
  <lastBuildDate>Thu, 05 Feb 2004 08:57:29 +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=418</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[CXTPC&#111;ntrolColorSelector : Hi all, I seem to have a problem...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=418&amp;PID=953&amp;title=cxtpcontrolcolorselector#953</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=274">JoeH</a><br /><strong>Subject:</strong> 418<br /><strong>Posted:</strong> 05 February 2004 at 8:57am<br /><br /><P><FONT face="Verdana, Arial, Helvetica, sans-serif">Hi all,</FONT></P><P><FONT face="Verdana, Arial, Helvetica, sans-serif">I seem to have a problem with an CXTPControlColorSelector in a VC6 legacy app. Searching the forums did not help, so here goes:</FONT></P><P><BR><FONT face="Verdana, Arial, Helvetica, sans-serif">The control displays just fine, selection of colors for the text works just fine but the control's GUI never displays the selected text color.</FONT></P><P><BR><FONT face="Verdana, Arial, Helvetica, sans-serif">The sample apps (e.g. TearOffPopups_vc60.dsw) do just that. The colored "bar" under the letter A on the control's GUI changes according to the selected text color.</FONT></P><P><BR><FONT face="Verdana, Arial, Helvetica, sans-serif">BTW, I use a 3rd party control for the view (Text Control) but like I said: setting the color in the view is OK as is setting/updating the color in the CXTPControlButtonColor tear off "More colors..." (always shows the color of the text with the caret in it).<BR></FONT></P><P><FONT face="Verdana, Arial, Helvetica, sans-serif">What am I missing? </FONT></P><P><FONT face="Verdana, Arial, Helvetica, sans-serif">Thanks,<BR>Joe</FONT></P><P><FONT face="Verdana, Arial, Helvetica, sans-serif">Sample code:</FONT></P><P><FONT face="Courier New, Courier, mono">Mainframe:<BR>...<BR>ON_UPDATE_COMMAND_UI(ID_COLORPICKER, OnUpdateSelectorTextColor)<BR>...<BR>OnCreateControl<BR>...<BR>if (lpCreateControl-&gt;nID == ID_COLORPICKER &amp;&amp; pToolBar-&gt;GetBarID() == IDR_FORMATBAR)<BR>{<BR>&nbsp;&#091;...&#093;<BR>&nbsp;CXTPControlPopupColor* pPopupColor = new CXTPControlPopupColor();<BR>&nbsp;CXTPPopupBar* pColorBar = (CXTPPopupBar*)CXTPPopupToolBar::CreateObject();<BR>&nbsp;pPopupColor-&gt;SetCommandBar(pColorBar);<BR>&nbsp;pColorBar-&gt;GetControls()-&gt;Add(new CXTPControlColorSelector(), ID_COLORPICKER);<BR>&nbsp;pColorBar-&gt;GetControls()-&gt;Add(new CXTPControlButtonColor(), ID_COLORPICKER_MORE);<BR>&nbsp;pColorBar-&gt;EnableCustomization(FALSE);<BR>&nbsp;pPopupColor-&gt;SetCaption(_T(strControlTitle));<BR>&nbsp;pColorBar-&gt;SetTearOffPopup(_T(strControlTitle), ID_COLORPICKER, 0);<BR>&nbsp;pColorBar-&gt;InternalRelease();<BR>&nbsp;lpCreateControl-&gt;pControl = pPopupColor;<BR>&nbsp;return TRUE;<BR>}</FONT></P><P><FONT face="Courier New, Courier, mono">UPDATE_COMMAND_UI Handler:</FONT></P><P><FONT face="Courier New, Courier, mono">OnUpdateSelectorTextColor(CCmdUI* pCmd)<BR>{</FONT></P><P><FONT face="Courier New, Courier, mono">&nbsp;pCmd-&gt;Enable(TRUE);<BR>&nbsp;CXTPCommandBar* pToolBar = (CXTPToolBar*)pCmd-&gt;m_pOther;<BR>&nbsp;if (pToolBar)<BR>&nbsp;{&nbsp;<BR>&nbsp;&nbsp;CXTPControlColorSelector* pSelector =  (CXTPControlColorSelector*)pToolBar-&gt;GetControls()-&gt;Ge tAt(pCmd-&gt;m_nIndex);<BR>&nbsp;&nbsp;pSelector-&gt;SetColor(m_clrText);<BR>&nbsp;}<BR>&nbsp;<BR>}</FONT><BR></P>]]>
   </description>
   <pubDate>Thu, 05 Feb 2004 08:57:29 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=418&amp;PID=953&amp;title=cxtpcontrolcolorselector#953</guid>
  </item> 
 </channel>
</rss>