<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Dialog:  swap/remove icon during runtime in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/Dialog-swap-remove-icon-during-runtime/m-p/364507#M1290</link>
    <description>&lt;P&gt;Is there a specific function or method I can use to swap or remove a dialog icon during runtime?&amp;nbsp; I see where I can revise text with&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;ACAPI_Interface (APIIo_SetMenuItemTextID, &amp;amp;itemRef, nullptr, itemStr);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but have not found something similar for icon images.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I'm defining the icon by the typical means in the .grc file and loading the default image by typical means in the Fix.grc file.&amp;nbsp; Graphics on my dialog are permanent this way.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to activate this feature with ::ButtonClicked from my dialog class.&amp;nbsp; I am monitoring the button click event by typical means:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;void JHP_UL_Dialog::ButtonClicked(const DG::ButtonClickEvent&amp;amp; ev)
{
	if (ev.GetSource() == &amp;amp;00Button)
	{
		// press button to make choice/swap out different image in dialog
		// wait for other dialog selections then press 'OK' to do stuff
	}
	if (ev.GetSource() == &amp;amp;01Button)
	{
		// press button to make choice/swap out different image in dialog
		// wait for other dialog selections then press 'OK' to do stuff
	}
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;thanks - chris&lt;/P&gt;</description>
    <pubDate>Fri, 09 Dec 2022 15:58:19 GMT</pubDate>
    <dc:creator>MudratDetector</dc:creator>
    <dc:date>2022-12-09T15:58:19Z</dc:date>
    <item>
      <title>Dialog:  swap/remove icon during runtime</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/Dialog-swap-remove-icon-during-runtime/m-p/364507#M1290</link>
      <description>&lt;P&gt;Is there a specific function or method I can use to swap or remove a dialog icon during runtime?&amp;nbsp; I see where I can revise text with&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;ACAPI_Interface (APIIo_SetMenuItemTextID, &amp;amp;itemRef, nullptr, itemStr);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but have not found something similar for icon images.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I'm defining the icon by the typical means in the .grc file and loading the default image by typical means in the Fix.grc file.&amp;nbsp; Graphics on my dialog are permanent this way.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to activate this feature with ::ButtonClicked from my dialog class.&amp;nbsp; I am monitoring the button click event by typical means:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;void JHP_UL_Dialog::ButtonClicked(const DG::ButtonClickEvent&amp;amp; ev)
{
	if (ev.GetSource() == &amp;amp;00Button)
	{
		// press button to make choice/swap out different image in dialog
		// wait for other dialog selections then press 'OK' to do stuff
	}
	if (ev.GetSource() == &amp;amp;01Button)
	{
		// press button to make choice/swap out different image in dialog
		// wait for other dialog selections then press 'OK' to do stuff
	}
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;thanks - chris&lt;/P&gt;</description>
      <pubDate>Fri, 09 Dec 2022 15:58:19 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/Dialog-swap-remove-icon-during-runtime/m-p/364507#M1290</guid>
      <dc:creator>MudratDetector</dc:creator>
      <dc:date>2022-12-09T15:58:19Z</dc:date>
    </item>
  </channel>
</rss>

