<?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 : A derived class : CXTPControlPopup ...</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Command Bars : A derived class : CXTPControlPopup ...]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sun, 19 Apr 2026 16:39:03 +0000</pubDate>
  <lastBuildDate>Wed, 27 Sep 2006 18:34:15 +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=4999</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[A derived class : CXTPControlPopup ... : Oleg,  I&amp;#039;m not sure what...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4999&amp;PID=16138&amp;title=a-derived-class-cxtpcontrolpopup#16138</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=374">ddlittle</a><br /><strong>Subject:</strong> 4999<br /><strong>Posted:</strong> 27 September 2006 at 6:34pm<br /><br />Oleg,<DIV>&nbsp;</DIV><DIV>I'm not sure what you mean.&nbsp; Do you mean that toolbars on dialogs don't use CImageLists?&nbsp; I tried creating a dummy toolbar with one button and doing what you mentioned, but got the same result.</DIV><DIV>&nbsp;</DIV><DIV>For some weird reason, "Large" icons display the correct buttons, but the customize box doesn't seem to send my dialog a message telling me it's time to resize and reposition everything.</DIV><DIV>&nbsp;</DIV><DIV>Thanks!</DIV>]]>
   </description>
   <pubDate>Wed, 27 Sep 2006 18:34:15 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4999&amp;PID=16138&amp;title=a-derived-class-cxtpcontrolpopup#16138</guid>
  </item> 
  <item>
   <title><![CDATA[A derived class : CXTPControlPopup ... : Sstar9, the problem gets even...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4999&amp;PID=15679&amp;title=a-derived-class-cxtpcontrolpopup#15679</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2272">kevins</a><br /><strong>Subject:</strong> 4999<br /><strong>Posted:</strong> 13 September 2006 at 4:53pm<br /><br />Sstar9, the problem gets even worse if you have created a new toolbar via customization!<br><br>Oleg's solution works for me. <img src="http://forum.codejock.com/smileys/smiley1.gif" border="0" align="middle"> I do have to call Redraw.<br><br>CXTPCommandBar *pToolBar = (CXTPToolBar*)pCmdUI-&gt;m_pOther;<br>pToolBar-&gt;Redraw();<br><br>I had actually come up with a solution very similar to Oleg's but I washoping for a better solution. Having to add copies of my tools in theresources seems like a bit of a work-around.<br><br>So Oleg, if you can keep this problem on a wish list or something that would be good.<br><br>Oh, final tidbit. None of this is necessary if the toolbars arecustomized to the Large Icons. It just simply works! Go figure. I thinkthe tools must be automatically refreshing when they are at this size(perhaps this needs to be done when they are not large as well...).<br><br>]]>
   </description>
   <pubDate>Wed, 13 Sep 2006 16:53:50 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4999&amp;PID=15679&amp;title=a-derived-class-cxtpcontrolpopup#15679</guid>
  </item> 
  <item>
   <title><![CDATA[A derived class : CXTPControlPopup ... : Hi, You can create new toolbar...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4999&amp;PID=15630&amp;title=a-derived-class-cxtpcontrolpopup#15630</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 4999<br /><strong>Posted:</strong> 12 September 2006 at 12:29am<br /><br />Hi,<DIV>You can create new toolbar with only one icon. and call </DIV><DIV></DIV>XTPImageManager-&gt;SetIcons(ID_MyToolbar_withIconINeed) . ]]>
   </description>
   <pubDate>Tue, 12 Sep 2006 00:29:26 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4999&amp;PID=15630&amp;title=a-derived-class-cxtpcontrolpopup#15630</guid>
  </item> 
  <item>
   <title><![CDATA[A derived class : CXTPControlPopup ... : In my Case, What Oleg suggested...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4999&amp;PID=15621&amp;title=a-derived-class-cxtpcontrolpopup#15621</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2281">Sstar9</a><br /><strong>Subject:</strong> 4999<br /><strong>Posted:</strong> 11 September 2006 at 9:16pm<br /><br /><P>In my Case, What Oleg suggested does work.&nbsp;By calling the XTPImageManager-&gt;SetIcons(ID_MyToolbar) first and then call the MyButton-&gt;SetColorWidth() again. I can reset the Toolbar button's icon&nbsp;to its default as in the Remource and redraw the color bar. </P><P>But one problem with the solution is by calling the XTPImageManager-&gt;SetIcons(ID_MyToolbar), all the control buttons' icons get updated to its default. But in my case, I just want to Update one. I am not sure if there is better solution than calling XTPImageManager-&gt;SetIcons(ID_MyToolbar) . </P><P>&nbsp;</P>]]>
   </description>
   <pubDate>Mon, 11 Sep 2006 21:16:42 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4999&amp;PID=15621&amp;title=a-derived-class-cxtpcontrolpopup#15621</guid>
  </item> 
  <item>
   <title><![CDATA[A derived class : CXTPControlPopup ... :  I don&amp;#039;t think that works,...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4999&amp;PID=15619&amp;title=a-derived-class-cxtpcontrolpopup#15619</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2272">kevins</a><br /><strong>Subject:</strong> 4999<br /><strong>Posted:</strong> 11 September 2006 at 5:27pm<br /><br />I don't think that works, if I understand what you mean.<br><br>As an example, in the Custom Themes example I modifiedCCustomThemesView::OnUpdateText so that I did not set the color if Redwas selected. When I select Red nothing happens. I need a way to getthe tool to go back to how it looks in the resources.<br><br>void CCustomThemesView::OnUpdateText(CCmdUI* pCmdUI)<br>{<br>&nbsp;&nbsp;&nbsp; CXTPControlPopupColor* pPopup = DYNAMIC_DOWNCAST(CXTPControlPopupColor, CXTPControl::FromUI(pCmdUI));<br>&nbsp;&nbsp; if (pPopup)<br>&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (m_clr != (COLORREF)0x0000FF) // RED<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pPopup-&gt;SetColor(m_clr);<br>&nbsp;&nbsp; }<br>&nbsp;&nbsp; pCmdUI-&gt;Enable(TRUE);<br>}<br><br><br>Can you elaborate on what you are doing?<br><br>]]>
   </description>
   <pubDate>Mon, 11 Sep 2006 17:27:54 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4999&amp;PID=15619&amp;title=a-derived-class-cxtpcontrolpopup#15619</guid>
  </item> 
  <item>
   <title><![CDATA[A derived class : CXTPControlPopup ... : Hi, it have to work. don&amp;#039;t...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4999&amp;PID=15614&amp;title=a-derived-class-cxtpcontrolpopup#15614</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 4999<br /><strong>Posted:</strong> 11 September 2006 at 4:23pm<br /><br /><P>Hi,</P><DIV>it have to work. don't call SetColor at all&nbsp;if color is none.</DIV>]]>
   </description>
   <pubDate>Mon, 11 Sep 2006 16:23:40 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4999&amp;PID=15614&amp;title=a-derived-class-cxtpcontrolpopup#15614</guid>
  </item> 
  <item>
   <title><![CDATA[A derived class : CXTPControlPopup ... : I have a similar problem. With...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4999&amp;PID=15613&amp;title=a-derived-class-cxtpcontrolpopup#15613</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2272">kevins</a><br /><strong>Subject:</strong> 4999<br /><strong>Posted:</strong> 11 September 2006 at 3:34pm<br /><br />I have a similar problem. With our color tools we want the color bar tobe an empty box when None is selected. So in the RedrawIcon routine Idon't want to draw anything on the tool, but what I end up with is thelast color drawn on the tool. I tried the following as suggested:<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pCommandBars-&gt;GetImageManager()-&gt;SetIcons(IDR_TOOLBAR_COLOR);<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pCommandBars-&gt;RedrawCommandBars();<br><br>But it did not help. I bet I could reproduce the problem by editingCXTPControlPopupColor::RedrawIcon, but I don't want to go to thateffort until I have to.<br><br>Any more ideas for a solution? Do I need to do something different to get it redrawn?<br><br>]]>
   </description>
   <pubDate>Mon, 11 Sep 2006 15:34:15 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4999&amp;PID=15613&amp;title=a-derived-class-cxtpcontrolpopup#15613</guid>
  </item> 
  <item>
   <title><![CDATA[A derived class : CXTPControlPopup ... : Obviously after you draw icon...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4999&amp;PID=15552&amp;title=a-derived-class-cxtpcontrolpopup#15552</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 4999<br /><strong>Posted:</strong> 08 September 2006 at 10:20am<br /><br />Obviously after you draw icon with width = 10 you changed icon and now width 2 can't be used for this icon. As solution you can reload this icon from original resource(bitmap or ico file)<DIV>pCommandBars-&gt;GetImageManager()-&gt;SetIcons(...);</DIV>]]>
   </description>
   <pubDate>Fri, 08 Sep 2006 10:20:12 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4999&amp;PID=15552&amp;title=a-derived-class-cxtpcontrolpopup#15552</guid>
  </item> 
  <item>
   <title><![CDATA[A derived class : CXTPControlPopup ... : I wanted to create a popup control...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=4999&amp;PID=15550&amp;title=a-derived-class-cxtpcontrolpopup#15550</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2281">Sstar9</a><br /><strong>Subject:</strong> 4999<br /><strong>Posted:</strong> 08 September 2006 at 9:55am<br /><br /><P>I wanted to create a popup control which is similar to CXTPControlPopupColor. Note the small color bar at bottom of the CXTPControlPopupColor&nbsp;Icon could be updated by calling its SetColor(nColor) function.&nbsp; Now I wanted it add one more parameter, nWidth, to this function, so that the Color bar's thickness could be updated as well. To do this, I created a derived a class from CXTPControlPopup, the code is something like below. </P><DIV>// in MyControlPopupColor.h </DIV><DIV>&nbsp;</DIV><DIV>class&nbsp; CMyControlPopupColor : public CXTPControlPopup<BR>{</DIV><DIV>...</DIV><DIV>&nbsp;</DIV><DIV>public:</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;void SetColorWidth(COLORREF clr, int nWidth);</DIV><DIV><BR>private:</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; void RedrawIcon(CXTPImageManagerIcon* pImage, CXTPImageManagerIconHandle* hIcon );</DIV><DIV>&nbsp;</DIV><DIV>private:</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp; COLORREF m_clr;<BR>&nbsp;&nbsp;&nbsp;&nbsp; int m_nWidth;&nbsp;&nbsp;&nbsp; </DIV><DIV>...</DIV><DIV>}</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>//in MyControlPopupColor.cpp</DIV><DIV>&nbsp;</DIV><DIV>//SetColorWidth function</DIV><DIV>void CMyControlPopupColor::SetColorWidth(COLORREF clr, int nWidth)<BR>{<BR>&nbsp;if (clr != m_clr)<BR>&nbsp;{<BR>&nbsp;&nbsp;m_clr = clr;</DIV><DIV>&nbsp;&nbsp;</DIV><DIV><FONT color=#cc0033>&nbsp; if (nWidth &lt; 1)<BR>&nbsp;&nbsp;&nbsp;m_nWidth = 1;<BR>&nbsp;&nbsp;else if(nWidth &gt; 10)<BR>&nbsp;&nbsp;&nbsp;m_nWidth = 10;<BR>&nbsp;&nbsp;else<BR>&nbsp;&nbsp;&nbsp;m_nWidth = nWidth;</FONT></DIV><DIV>&nbsp;</DIV><DIV>&nbsp;&nbsp;CXTPImageManagerIconSet* pIconSet = GetImageManager()-&gt;GetIconSet(GetIconId());<BR>&nbsp;&nbsp;if (pIconSet)<BR>&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;pIconSet-&gt;RefreshAll();</DIV><DIV>&nbsp;&nbsp;&nbsp;CXTPImageManagerIconSet::CIconSetMap* pMap = pIconSet-&gt;GetIcons();</DIV><DIV>&nbsp;&nbsp;&nbsp;POSITION pos = pMap-&gt;GetStartPosition();<BR>&nbsp;&nbsp;&nbsp;UINT nWidth;<BR>&nbsp;&nbsp;&nbsp;CXTPImageManagerIcon* pImage;<BR>&nbsp;&nbsp;&nbsp;while (pos != NULL)<BR>&nbsp;&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;pMap-&gt;GetNextAssoc(pos, nWidth, pImage);</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;CXTPImageManagerIconHandle hIcon;<BR>&nbsp;&nbsp;&nbsp;&nbsp;RedrawIcon(pImage, &amp;hIcon);</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;if (!hIcon.IsEmpty())<BR>&nbsp;&nbsp;&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pImage-&gt;SetIcon(hIcon);<BR>&nbsp;&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;&nbsp;RedrawParent();<BR>&nbsp;&nbsp;}<BR>&nbsp;}<BR>}</DIV><DIV>&nbsp;</DIV><DIV>//RedrawIcon function</DIV><DIV>void CMyControlPopupColor::RedrawIcon(CXTPImageManagerIcon* pImage, CXTPImageManagerIconHandle* pHandle)<BR>{<BR>&nbsp;CXTPImageManagerIconHandle&amp; hIcon = pImage-&gt;GetIcon();</DIV><DIV>&nbsp;if (hIcon.IsEmpty())<BR>&nbsp;&nbsp;return;</DIV><DIV>&nbsp;if (!hIcon.IsAlpha())<BR>&nbsp;{<BR>&nbsp;&nbsp;ICONINFO info;</DIV><DIV>&nbsp;&nbsp;if (GetIconInfo(hIcon.GetIcon(), &amp;info))<BR>&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;CXTPCompatibleDC dc(NULL, CBitmap::FromHandle(info.hbmColor));<BR>&nbsp;&nbsp;&nbsp;&nbsp;CXTPCompatibleDC dcMask(NULL, CBitmap::FromHandle(info.hbmMask));</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;BITMAP bmp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;::GetObject(info.hbmColor, sizeof(BITMAP), &amp;bmp);<BR><FONT color=#cc0033>&nbsp;&nbsp;&nbsp;&nbsp;//int nHeight = int((double)bmp.bmHeight / 5);</FONT></DIV><DIV><FONT color=#cc0033>&nbsp;&nbsp;&nbsp;&nbsp;int nHeight = int(1 + (bmp.bmHeight) / 30.0 * m_nWidth);</FONT></DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;CRect rc(0, bmp.bmHeight - nHeight, bmp.bmWidth, bmp.bmHeight);<BR>&nbsp;&nbsp;&nbsp;&nbsp;dc.FillSolidRect(rc, m_clr);<BR>&nbsp;&nbsp;&nbsp;&nbsp;dcMask.FillSolidRect(rc, 1);<BR>&nbsp;&nbsp;&nbsp;}</DIV><DIV>&nbsp;&nbsp;&nbsp;*pHandle = CreateIconIndirect(&amp;info);</DIV><DIV>&nbsp;&nbsp;&nbsp;::DeleteObject(info.hbmMask);<BR>&nbsp;&nbsp;&nbsp;::DeleteObject(info.hbmColor);<BR>&nbsp;&nbsp;}<BR>&nbsp;}<BR>&nbsp;else<BR>&nbsp;{<BR>&nbsp;&nbsp;CDC dcSrc;<BR>&nbsp;&nbsp;dcSrc.CreateCompatibleDC(NULL);</DIV><DIV>&nbsp;&nbsp;PBYTE pBits = 0;<BR>&nbsp;&nbsp;PBITMAPINFO pBitmapInfo = 0;</DIV><DIV>&nbsp;&nbsp;pHandle-&gt;CopyHandle(hIcon);</DIV><DIV>&nbsp;&nbsp;TRY<BR>&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;UINT nSize;<BR>&nbsp;&nbsp;&nbsp;if (!CXTPImageManagerIcon::GetBitmapBits(dcSrc, pHandle-&gt;GetBitmap(), pBitmapInfo, (LPVOID&amp;)pBits, nSize))<BR>&nbsp;&nbsp;&nbsp;&nbsp;AfxThrowMemoryException();</DIV><DIV>&nbsp;&nbsp;&nbsp;DWORD dwColor = 0xFF000000 | CLR_TO_RGBQUAD(m_clr);<BR><FONT color=#cc3333>&nbsp;&nbsp;&nbsp;int temp = int (1 + (pBitmapInfo-&gt;bmiHeader.biHeight) / 30.0 * m_nWidth);</FONT></DIV><DIV><FONT color=#cc3333>&nbsp;&nbsp;&nbsp;//int nCount = pBitmapInfo-&gt;bmiHeader.biHeight / 5 * pBitmapInfo-&gt;bmiHeader.biWidth * 4;<BR>&nbsp;&nbsp;&nbsp;int nCount = temp * pBitmapInfo-&gt;bmiHeader.biWidth * 4; </FONT></DIV><DIV>&nbsp;&nbsp;&nbsp;for (int i = 0; i &lt; nCount; i += 4)<BR>&nbsp;&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;&nbsp;*LPDWORD(&amp;pBits<em>) = dwColor;<BR>&nbsp;&nbsp;&nbsp;}</DIV><DIV>&nbsp;&nbsp;&nbsp;SetDIBits(dcSrc, pHandle-&gt;GetBitmap(), 0, pBitmapInfo-&gt;bmiHeader.biHeight, pBits, pBitmapInfo, DIB_RGB_COLORS);</DIV><DIV><BR>&nbsp;&nbsp;}<BR>&nbsp;&nbsp;CATCH (CMemoryException, e)<BR>&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;TRACE(_T("Failed -- Memory exception thrown."));<BR>&nbsp;&nbsp;}<BR>&nbsp;&nbsp;END_CATCH</DIV><DIV>&nbsp;&nbsp;free(pBits);<BR>&nbsp;&nbsp;free(pBitmapInfo);</DIV><DIV>&nbsp;}<BR>}</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>//The SetColorWidth(.) function and RedrawIcon(.) functions are slightly modified versions of that in the CXTPControlPopupColor class. I have&nbsp;highlighted my modified code&nbsp;in red. </DIV><DIV>&nbsp;</DIV><DIV>With the derived class, I found I can change Color bar's width now but there is a problem.</DIV><DIV>&nbsp;</DIV><DIV>If I call SetColorWidth function twice, first time with thicker width and and second time with a thinner width, e.g.</DIV><DIV>&nbsp;</DIV><DIV>first time, </DIV><DIV>&nbsp;</DIV><DIV>pColorControl-&gt;SetColorWidth(COLORRED, 10);</DIV><DIV>&nbsp;</DIV><DIV>second time, </DIV><DIV>&nbsp;</DIV><DIV>pColorControl-&gt;SetColorWidth(COLORRED, 2);</DIV><DIV>&nbsp;</DIV><DIV>after the second call, the color bar thichness does not reduced to 2. The reason is color bar drawn first time is not removed during the 2nd to the function. </DIV><DIV>&nbsp;</DIV><DIV>To solve this problem, I have tried to restore the original toolbar control's&nbsp;Icon by calling </DIV><DIV>&nbsp;</DIV><DIV>pColorControl-&gt;Reset();</DIV><DIV>pColorControl-&gt;SetIconId(Orignal_Icon_ID);</DIV><DIV>&nbsp;</DIV><DIV>before the second call to SetColorWidth(.) function.&nbsp;However,&nbsp;this does not work.&nbsp; I cannot remove previously drawn&nbsp;color bar on the Icon.&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>Could anybody help&nbsp;by giving some suggestions on how the&nbsp;above code should be modified to achieve the purpose?&nbsp;I&nbsp;would like to&nbsp;use Alpha toolbar&nbsp;icons in my application,&nbsp;hence I don't want&nbsp;the modified control Icon appear&nbsp;in different style from other icons on the Toolbar. &nbsp;</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Fri, 08 Sep 2006 09:55:56 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=4999&amp;PID=15550&amp;title=a-derived-class-cxtpcontrolpopup#15550</guid>
  </item> 
 </channel>
</rss>