<?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 replace the default bitmaps?</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : How to replace the default bitmaps?]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Fri, 01 May 2026 05:20:54 +0000</pubDate>
  <lastBuildDate>Tue, 22 Sep 2009 16:24:20 +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=15066</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 replace the default bitmaps? : Yes, but then you would have to...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15066&amp;PID=53352&amp;title=how-to-replace-the-default-bitmaps#53352</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2426">robin_l</a><br /><strong>Subject:</strong> 15066<br /><strong>Posted:</strong> 22 September 2009 at 4:24pm<br /><br />Yes, but then you would have to remember&nbsp;replace every edit control with some sort of&nbsp;C_My_XTPEdit, which&nbsp;is not really&nbsp;the point,&nbsp;and the keyboard cues are wrong if you don't...<DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>I see that the CTTPEdit context menu is created with a NULL CXTPCommandBars* within <FONT size=2>XTFuncContextMenu() &#091;Controls\XTFunctions.cpp&#093;</FONT>.</DIV><DIV>&nbsp;</DIV><DIV>If you rewrite this as below then the edit control context&nbsp;menu not only works properly, it allows the status bar text to be shown correctly when the menu is displayed (and you even get tool tips if enabled).</DIV><DIV>&nbsp;</DIV><DIV><table width="99%"><tr><td><pre class="BBcode"></DIV><DIV>CXTPMDIFrameWnd* pMainWnd = DYNAMIC_DOWNCAST(CXTPMDIFrameWnd, AfxGetMainWnd());<BR>CXTPFrameWnd* pFrameWnd = DYNAMIC_DOWNCAST(CXTPFrameWnd, AfxGetMainWnd());<BR>CXTPCommandBars* pCommandBars = NULL;<BR>if (pMainWnd)<BR>{<BR>&nbsp;&nbsp;&nbsp; pCommandBars = pMainWnd-&gt;GetCommandBars();<BR>}<BR>else if (pFrameWnd)<BR>{<BR>&nbsp;&nbsp;&nbsp; pCommandBars = pFrameWnd-&gt;GetCommandBars();<BR>}</DIV><DIV>&nbsp;&nbsp;CXTPPopupBar* pPopupBar = CXTPPopupBar::CreatePopupBar(pCommandBars);<BR></pre></td></tr></table></DIV><DIV>&nbsp;</DIV><DIV>XTFunctions.cpp also&nbsp;needs to</DIV><DIV>#include &lt;CommandBars\XTPFrameWnd.h&gt;</DIV><DIV>for this to compile<BR></DIV><DIV>&nbsp;</DIV><DIV><FONT size=2></FONT>&nbsp;</DIV>]]>
   </description>
   <pubDate>Tue, 22 Sep 2009 16:24:20 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15066&amp;PID=53352&amp;title=how-to-replace-the-default-bitmaps#53352</guid>
  </item> 
  <item>
   <title><![CDATA[How to replace the default bitmaps? : Hi,  Yes, there is such thing...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15066&amp;PID=53329&amp;title=how-to-replace-the-default-bitmaps#53329</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 15066<br /><strong>Posted:</strong> 22 September 2009 at 3:48am<br /><br />Hi,<DIV>&nbsp;</DIV><DIV>Yes, there is such thing :( Such context menu doesn't linked to any CXTPCommandBars so can't use its keyboardCuesShow option. </DIV><DIV>&nbsp;</DIV><DIV>If you use CXTPEdit - you can create own class, copy OnContextMenu previous code, but instead XTFuncContextMenu call some pCommandBars-&gt;TrackPopupMenu.</DIV>]]>
   </description>
   <pubDate>Tue, 22 Sep 2009 03:48:22 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15066&amp;PID=53329&amp;title=how-to-replace-the-default-bitmaps#53329</guid>
  </item> 
  <item>
   <title><![CDATA[How to replace the default bitmaps? :   znakeeye wrote:Which Grid control...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15066&amp;PID=53322&amp;title=how-to-replace-the-default-bitmaps#53322</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2426">robin_l</a><br /><strong>Subject:</strong> 15066<br /><strong>Posted:</strong> 21 September 2009 at 4:28pm<br /><br /><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Originally posted by znakeeye" alt="Originally posted by znakeeye" style="vertical-align: text-bottom;" /> <strong>znakeeye wrote:</strong><br /><br />Which Grid control are you using? :o</td></tr></table> <DIV></DIV><DIV></DIV>Home-grown and idiosyncratic <img src="http://forum.codejock.com/smileys/smiley36.gif" border="0">]]>
   </description>
   <pubDate>Mon, 21 Sep 2009 16:28:37 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15066&amp;PID=53322&amp;title=how-to-replace-the-default-bitmaps#53322</guid>
  </item> 
  <item>
   <title><![CDATA[How to replace the default bitmaps? : Which Grid control are you using?...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15066&amp;PID=53301&amp;title=how-to-replace-the-default-bitmaps#53301</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2198">znakeeye</a><br /><strong>Subject:</strong> 15066<br /><strong>Posted:</strong> 21 September 2009 at 3:16am<br /><br />Which Grid control are you using? :o]]>
   </description>
   <pubDate>Mon, 21 Sep 2009 03:16:47 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15066&amp;PID=53301&amp;title=how-to-replace-the-default-bitmaps#53301</guid>
  </item> 
  <item>
   <title><![CDATA[How to replace the default bitmaps? : No problem!  But could you take...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15066&amp;PID=53299&amp;title=how-to-replace-the-default-bitmaps#53299</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2426">robin_l</a><br /><strong>Subject:</strong> 15066<br /><strong>Posted:</strong> 21 September 2009 at 2:46am<br /><br />No problem!<DIV>&nbsp;</DIV><DIV>But could you take a look to see why the edit control context menu&nbsp;ALWAYS&nbsp;shows the keyboard accelerators (the underlines on the menu text)&nbsp;even when the ALT key is not depressed. I looked through the code but could not find any reason that this should be happening.....</DIV>]]>
   </description>
   <pubDate>Mon, 21 Sep 2009 02:46:50 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15066&amp;PID=53299&amp;title=how-to-replace-the-default-bitmaps#53299</guid>
  </item> 
  <item>
   <title><![CDATA[How to replace the default bitmaps? : Thanks for sharing this idea :)...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15066&amp;PID=53296&amp;title=how-to-replace-the-default-bitmaps#53296</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 15066<br /><strong>Posted:</strong> 21 September 2009 at 2:37am<br /><br />Thanks for sharing this idea :)]]>
   </description>
   <pubDate>Mon, 21 Sep 2009 02:37:36 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15066&amp;PID=53296&amp;title=how-to-replace-the-default-bitmaps#53296</guid>
  </item> 
  <item>
   <title><![CDATA[How to replace the default bitmaps? : OK! I&amp;#039;ve worked out a general...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15066&amp;PID=53285&amp;title=how-to-replace-the-default-bitmaps#53285</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2426">robin_l</a><br /><strong>Subject:</strong> 15066<br /><strong>Posted:</strong> 19 September 2009 at 5:19pm<br /><br />OK! I've worked out a general and simple way to selectively replace any of the CodeJock resources in a statically linked project, without having to edit any of the CodeJock source!!!! <img src="https://forum.codejock.com/smileys/smiley17.gif" border="0"><DIV>&nbsp;</DIV><DIV>The trick is to point the resource compiler to a new directory where you place any edited resource files, replicating the CodeJock directory structure.</DIV><DIV>&nbsp;</DIV><DIV>First, edit the properties for your project's resource file (.RC)&nbsp;and add a new directory to the include directory path--here you will place any edited bitmaps:</DIV><DIV>&nbsp;</DIV><DIV><img src="https://forum.codejock.com/uploads/20090919_170200_props.png" border="0"></DIV><DIV>&nbsp;</DIV><DIV>In this example&nbsp;I've added a subdirectory to my RES directory, which seems a suitable place for this.</DIV><DIV>&nbsp;</DIV><DIV>Within this subdirectory, recreate any relevant directory stucture found in the CodeJock source directory--you only need to do this for any individual files that you wish to replace. For example, the bitmap used for the edit menu is found at Controls\res\tbar_hex.bmp. Therefore to replace just this file, I create a $(ProjectDir)RES\CodeJockReplace\Controls\res\tbar_hex.bmp file that uses the images I require. The magic of setting the include directory for the .RC file is that during compilation it will search for resource elements in that directory first and will only go to the default directories if nothing is found.</DIV><DIV>&nbsp;</DIV><DIV>After putting an edited tbar_hex.bmp file there, the result in my application is as below:</DIV><DIV>&nbsp;</DIV><DIV><img src="https://forum.codejock.com/uploads/20090919_171329_edit_bitmap.png" border="0"></DIV><DIV>&nbsp;</DIV><DIV>Result! All edit controls within the application are now updated.</DIV><DIV>&nbsp;</DIV><DIV>Repeat as required for any bitmap. The beauty is that there is no need to edit the CodeJock source, which means that nothing should break when new versions of the library are released.</DIV>]]>
   </description>
   <pubDate>Sat, 19 Sep 2009 17:19:00 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15066&amp;PID=53285&amp;title=how-to-replace-the-default-bitmaps#53285</guid>
  </item> 
  <item>
   <title><![CDATA[How to replace the default bitmaps? : Unfortunately not. The GetComm...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15066&amp;PID=53266&amp;title=how-to-replace-the-default-bitmaps#53266</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2426">robin_l</a><br /><strong>Subject:</strong> 15066<br /><strong>Posted:</strong> 19 September 2009 at 2:42am<br /><br />Unfortunately not. The <FONT size=2><FONT color=#010001>GetCommandBars</FONT>()-&gt;<FONT color=#010001><FONT color=#010001>GetImageManager</FONT></FONT>()-&gt;<FONT color=#010001><FONT color=#010001>SetIcons(...) command does set the icons for whenever you use a menu that you have created yourself and I already do this. However, the in-built edit controls don't use these. I already do this for menus I create, for example, the menu below within a grid control (home grown)&nbsp;is "mine" and uses redefined ID_EDIT_CUT etc:<DIV><img src="http://forum.codejock.com/uploads/20090919_023319_menuic&#111;n1.png" border="0"></DIV><DIV>&nbsp;</DIV><DIV>However, my application happens to&nbsp;allow editing of the text within the grid shown above&nbsp;using a standard edit box, which produces the following:</DIV><DIV><img src="http://forum.codejock.com/uploads/20090919_023526_menuic&#111;n2.png" border="0"></DIV><DIV>&nbsp;</DIV><DIV>This, and all edit controls within dialog boxes,&nbsp;uses the hard-wired CodeJock resources. It also, for reasons I don't understand, ALWAYS&nbsp;shows the keyboard accelerators (the underlines on the menu text)&nbsp;even though the ALT key is not depressed.</DIV></FONT></FONT></FONT>]]>
   </description>
   <pubDate>Sat, 19 Sep 2009 02:42:39 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15066&amp;PID=53266&amp;title=how-to-replace-the-default-bitmaps#53266</guid>
  </item> 
  <item>
   <title><![CDATA[How to replace the default bitmaps? : May be simple? UINT uiMenuCopyPaste[]...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15066&amp;PID=53043&amp;title=how-to-replace-the-default-bitmaps#53043</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4857">sharky</a><br /><strong>Subject:</strong> 15066<br /><strong>Posted:</strong> 15 September 2009 at 4:04pm<br /><br /><P>May be simple?</P><FONT color=#010001 size=2><FONT color=#010001 size=2><DIV>UINT</FONT></FONT><FONT size=2> </FONT><FONT color=#010001 size=2><FONT color=#010001 size=2>uiMenuCopyPaste</FONT></FONT><FONT size=2>&#091;&#093; = {</FONT><FONT color=#010001 size=2><FONT color=#010001 size=2>ID_EDIT_CUT</FONT></FONT><FONT size=2>,</FONT><FONT color=#010001 size=2><FONT color=#010001 size=2>ID_EDIT_COPY</FONT></FONT><FONT size=2>,</FONT><FONT color=#010001 size=2><FONT color=#010001 size=2>ID_EDIT_PASTE</FONT></FONT><FONT size=2>,</FONT><FONT color=#010001 size=2><FONT color=#010001 size=2>ID_EDIT_UNDO</FONT></FONT><FONT size=2>,</FONT><FONT color=#010001 size=2><FONT color=#010001 size=2>ID_EDIT_REDO</FONT></FONT><FONT size=2>,</FONT><FONT color=#010001 size=2><FONT color=#010001 size=2>ID_EDIT_CLEAR</FONT></FONT><FONT size=2>, </FONT><FONT color=#010001 size=2><FONT color=#010001 size=2>ID_EDIT_PASTE_SPECIAL</FONT></FONT><FONT size=2>};</DIV><P></FONT><FONT color=#010001 size=2><FONT color=#010001 size=2>GetCommandBars</FONT></FONT><FONT size=2>()-&gt;</FONT><FONT color=#010001 size=2><FONT color=#010001 size=2>GetImageManager</FONT></FONT><FONT size=2>()-&gt;</FONT><FONT color=#010001 size=2><FONT color=#010001 size=2>SetIcons</FONT></FONT><FONT size=2>(</FONT><FONT color=#010001 size=2><FONT color=#010001 size=2>IDB_TOOLBAR_EDIT</FONT></FONT><FONT size=2>, </FONT><FONT color=#010001 size=2><FONT color=#010001 size=2>uiMenuCopyPaste</FONT></FONT><FONT size=2>, </FONT><FONT color=#010001 size=2><FONT color=#010001 size=2>_countof</FONT></FONT><FONT size=2>(</FONT><FONT color=#010001 size=2><FONT color=#010001 size=2>uiMenuCopyPaste</FONT></FONT><FONT size=2>), </FONT><FONT color=#010001 size=2><FONT color=#010001 size=2>CSize</FONT></FONT><FONT size=2>(16, 16));</P><DIV>Where IDB_TOOLBAR_EDIT&nbsp;resource bitmap with new icons: <img src="http://forum.codejock.com/uploads/20090915_160012_toolbar_edit.png" border="0"></DIV><DIV>As result:</DIV><DIV><img src="http://forum.codejock.com/uploads/20090915_160237_sample.png" border="0"></DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV></FONT>]]>
   </description>
   <pubDate>Tue, 15 Sep 2009 16:04:47 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15066&amp;PID=53043&amp;title=how-to-replace-the-default-bitmaps#53043</guid>
  </item> 
  <item>
   <title><![CDATA[How to replace the default bitmaps? : Hi,  With statically linked,...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15066&amp;PID=52836&amp;title=how-to-replace-the-default-bitmaps#52836</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 15066<br /><strong>Posted:</strong> 07 September 2009 at 6:35am<br /><br />Hi,<DIV>&nbsp;</DIV><DIV>With statically linked, afraid only replacing bitmap in our sources can help.</DIV>]]>
   </description>
   <pubDate>Mon, 07 Sep 2009 06:35:51 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15066&amp;PID=52836&amp;title=how-to-replace-the-default-bitmaps#52836</guid>
  </item> 
 </channel>
</rss>