<?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 : how to switch bitmap in toolbar dynamica?</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : how to switch bitmap in toolbar dynamica?]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Mon, 20 Apr 2026 14:38:26 +0000</pubDate>
  <lastBuildDate>Wed, 17 Nov 2004 00:03:14 +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=1413</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[how to switch bitmap in toolbar dynamica? : CControlBitmap::CControlBitmap(){m_nMyBitmapId...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=1413&amp;PID=4031&amp;title=how-to-switch-bitmap-in-toolbar-dynamica#4031</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=478">freehawk</a><br /><strong>Subject:</strong> 1413<br /><strong>Posted:</strong> 17 November 2004 at 12:03am<br /><br /><P>CControlBitmap::CControlBitmap()<BR>{<BR>&nbsp;m_nMyBitmapId = ID_BUTTON_BITMAP1;<BR>&nbsp;&nbsp;if (m_bmpControl1.GetSafeHandle())<BR>&nbsp;&nbsp;&nbsp;return;</P><P> &nbsp;&nbsp;VERIFY(m_bmpControl1.LoadBitmap(ID_BUTTON_BITMAP ));<BR>&nbsp;&nbsp;if (m_bmpControl2.GetSafeHandle())<BR>&nbsp;&nbsp;&nbsp;return;</P><P> &nbsp;&nbsp;VERIFY(m_bmpControl2.LoadBitmap(ID_BUTTON_BITMAP 1));<BR>}<BR>void CControlBitmap::SetBitmapId(int nBitmapId)<BR>{<BR>&nbsp;m_nMyBitmapId = nBitmapId;<BR>&nbsp;}<BR>void CControlBitmap::Draw(CDC* pDC)<BR>{<BR>&nbsp;&nbsp;switch(m_nMyBitmapId)<BR>&nbsp;{<BR>&nbsp;case ID_BUTTON_BITMAP:<BR>&nbsp;&nbsp;&nbsp;pDC-&gt;DrawState(m_rcControl.TopLeft(), m_rcControl.Size(), &amp;m_bmpControl1, DST_BITMAP);<BR>&nbsp;&nbsp;break;</P><P>&nbsp;case ID_BUTTON_BITMAP1:<BR>&nbsp;&nbsp;pDC-&gt;DrawState(m_rcControl.TopLeft(), m_rcControl.Size(), &amp;m_bmpControl2, DST_BITMAP);<BR>&nbsp;&nbsp;break;<BR>&nbsp;}<BR>}</P><P>I debugged it, in "Draw(CDC* pDC)" m_nMyBitmapId is always ID_BUTTON_BITMAP1. I dont know why.</P><P><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Originally posted by oleg" alt="Originally posted by oleg" style="vertical-align: text-bottom;" /> <strong>oleg wrote:</strong><br /><br /></P><P>give me your void CControlStatic::Draw(CDC* pDC)</P><P>and how you change its id.</P></td></tr></table> ]]>
   </description>
   <pubDate>Wed, 17 Nov 2004 00:03:14 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=1413&amp;PID=4031&amp;title=how-to-switch-bitmap-in-toolbar-dynamica#4031</guid>
  </item> 
  <item>
   <title><![CDATA[how to switch bitmap in toolbar dynamica? : give me your void CControlStatic::Draw(CDC*...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=1413&amp;PID=4028&amp;title=how-to-switch-bitmap-in-toolbar-dynamica#4028</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 1413<br /><strong>Posted:</strong> 16 November 2004 at 11:40pm<br /><br /><P>give me your void CControlStatic::Draw(CDC* pDC)</P><P>and how you change its id.</P>]]>
   </description>
   <pubDate>Tue, 16 Nov 2004 23:40:47 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=1413&amp;PID=4028&amp;title=how-to-switch-bitmap-in-toolbar-dynamica#4028</guid>
  </item> 
  <item>
   <title><![CDATA[how to switch bitmap in toolbar dynamica? : int CMainFrame::OnCreateControl(LPCREATECONTROLSTRUCT...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=1413&amp;PID=4026&amp;title=how-to-switch-bitmap-in-toolbar-dynamica#4026</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=478">freehawk</a><br /><strong>Subject:</strong> 1413<br /><strong>Posted:</strong> 16 November 2004 at 8:33pm<br /><br /><P>int CMainFrame::OnCreateControl(LPCREATECONTROLSTRUCT lpCreateControl)<BR>&nbsp;if (lpCreateControl-&gt;nID == ID_BUTTON_BITMAP3)<BR>&nbsp;{<BR>&nbsp;&nbsp;m_pControlBitmap = new CControStatic();<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;lpCreateControl-&gt;pControl = m_pControlBitmap;<BR>&nbsp;&nbsp;return TRUE;<BR>&nbsp;}<BR></P><P>and in "Draw()" of "CControStatic", I load a bitmap, but when I change the ID&nbsp;of bitmap, the bitmap&nbsp;in toolbar can not be changed&nbsp;at all. Could you tell me why?</P><P>Thanks.</P><P>&nbsp;</P><P>&nbsp;</P><P>&nbsp;</P><P><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Originally posted by oleg" alt="Originally posted by oleg" style="vertical-align: text-bottom;" /> <strong>oleg wrote:</strong><br /><br /></P><P>As variant you can draw control manually:</P><P>class CControlStatic : public CXTPControl<BR>{<BR>&nbsp;DECLARE_XTP_CONTROL(CControlStatic)<BR>protected:<BR>&nbsp;virtual CSize GetSize(CDC* pDC);<BR>&nbsp;virtual void Draw(CDC* pDC);<BR>};</P><P>IMPLEMENT_XTP_CONTROL(CControlStatic, CXTPControl)</P><P>CSize CControlStatic::GetSize(CDC* pDC)<BR>{<BR>&nbsp;BOOL bVert = GetParent()-&gt;GetPosition() == xtpBarRight || GetParent()-&gt;GetPosition() == xtpBarLeft;</P><P>&nbsp;if (bVert) return CSize(30, 20);</P><P>&nbsp;return CSize(20, 30);</P><P>}<BR>void CControlStatic::Draw(CDC* pDC)<BR>{</P><P>...<BR>}</P><P>&nbsp;</P></td></tr></table> ]]>
   </description>
   <pubDate>Tue, 16 Nov 2004 20:33:15 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=1413&amp;PID=4026&amp;title=how-to-switch-bitmap-in-toolbar-dynamica#4026</guid>
  </item> 
  <item>
   <title><![CDATA[how to switch bitmap in toolbar dynamica? : As variant you can draw control...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=1413&amp;PID=4008&amp;title=how-to-switch-bitmap-in-toolbar-dynamica#4008</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 1413<br /><strong>Posted:</strong> 16 November 2004 at 3:13am<br /><br /><P>As variant you can draw control manually:</P><P>class CControlStatic : public CXTPControl<BR>{<BR>&nbsp;DECLARE_XTP_CONTROL(CControlStatic)<BR>protected:<BR>&nbsp;virtual CSize GetSize(CDC* pDC);<BR>&nbsp;virtual void Draw(CDC* pDC);<BR>};</P><P>IMPLEMENT_XTP_CONTROL(CControlStatic, CXTPControl)</P><P>CSize CControlStatic::GetSize(CDC* pDC)<BR>{<BR>&nbsp;BOOL bVert = GetParent()-&gt;GetPosition() == xtpBarRight || GetParent()-&gt;GetPosition() == xtpBarLeft;</P><P>&nbsp;if (bVert) return CSize(30, 20);</P><P>&nbsp;return CSize(20, 30);</P><P>}<BR>void CControlStatic::Draw(CDC* pDC)<BR>{</P><P>...<BR>}</P><P>&nbsp;</P>]]>
   </description>
   <pubDate>Tue, 16 Nov 2004 03:13:09 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=1413&amp;PID=4008&amp;title=how-to-switch-bitmap-in-toolbar-dynamica#4008</guid>
  </item> 
  <item>
   <title><![CDATA[how to switch bitmap in toolbar dynamica? :  Perhaps you need to do a little...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=1413&amp;PID=4006&amp;title=how-to-switch-bitmap-in-toolbar-dynamica#4006</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=203">Ark42</a><br /><strong>Subject:</strong> 1413<br /><strong>Posted:</strong> 15 November 2004 at 9:05pm<br /><br /><br>Perhaps you need to do a little more research of the documentation orheader files. SetIconID is still probably what you want to use.<br>Just add your bitmap or icon to the image manager.<br><br>]]>
   </description>
   <pubDate>Mon, 15 Nov 2004 21:05:59 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=1413&amp;PID=4006&amp;title=how-to-switch-bitmap-in-toolbar-dynamica#4006</guid>
  </item> 
  <item>
   <title><![CDATA[how to switch bitmap in toolbar dynamica? : I want to display a bitmap which...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=1413&amp;PID=4005&amp;title=how-to-switch-bitmap-in-toolbar-dynamica#4005</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=478">freehawk</a><br /><strong>Subject:</strong> 1413<br /><strong>Posted:</strong> 15 November 2004 at 8:40pm<br /><br /><P>I want to display a bitmap which is not icon or button in toolbar. So "SetIconID" is not useful.</P><P>&nbsp;</P><P><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Originally posted by Ark42" alt="Originally posted by Ark42" style="vertical-align: text-bottom;" /> <strong>Ark42 wrote:</strong><br /><br /><BR>Use SetIconID - or look at CXTPControlPopupColor if you want to draw into the icon manually.<BR><BR></td></tr></table> </P>]]>
   </description>
   <pubDate>Mon, 15 Nov 2004 20:40:42 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=1413&amp;PID=4005&amp;title=how-to-switch-bitmap-in-toolbar-dynamica#4005</guid>
  </item> 
  <item>
   <title><![CDATA[how to switch bitmap in toolbar dynamica? :  Use SetIconID - or look at CXTPControlPopupColor...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=1413&amp;PID=4001&amp;title=how-to-switch-bitmap-in-toolbar-dynamica#4001</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=203">Ark42</a><br /><strong>Subject:</strong> 1413<br /><strong>Posted:</strong> 15 November 2004 at 11:37am<br /><br /><br>Use SetIconID - or look at CXTPControlPopupColor if you want to draw into the icon manually.<br><br>]]>
   </description>
   <pubDate>Mon, 15 Nov 2004 11:37:27 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=1413&amp;PID=4001&amp;title=how-to-switch-bitmap-in-toolbar-dynamica#4001</guid>
  </item> 
  <item>
   <title><![CDATA[how to switch bitmap in toolbar dynamica? : Hello  I want to switch bitmap...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=1413&amp;PID=3998&amp;title=how-to-switch-bitmap-in-toolbar-dynamica#3998</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=478">freehawk</a><br /><strong>Subject:</strong> 1413<br /><strong>Posted:</strong> 15 November 2004 at 1:20am<br /><br /><P>Hello </P><P>&nbsp;I want to switch bitmap control in toolbar dynamically, How to realize it?</P><P>Thanks.</P><P>-Freehawk</P>]]>
   </description>
   <pubDate>Mon, 15 Nov 2004 01:20:04 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=1413&amp;PID=3998&amp;title=how-to-switch-bitmap-in-toolbar-dynamica#3998</guid>
  </item> 
 </channel>
</rss>