<?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 How to use DG::ModalDialog without GRC and add items to it in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-use-DG-ModalDialog-without-GRC-and-add-items-to-it/m-p/166286#M6740</link>
    <description>&lt;DIV class="actalk-migrated-content"&gt;We have &lt;BR /&gt;&lt;BR /&gt;static void Do_Dialog (void)&lt;BR /&gt;{&lt;BR /&gt;DG::ModalDialog dlg(DG::Rect(200,200,700,800));&lt;BR /&gt;dlg.SetTitle("The Title");&lt;BR /&gt;dlg.Invoke();&lt;BR /&gt;} // Do_Dialog &lt;BR /&gt;&lt;BR /&gt;dlg created without using any GRC resource. &lt;BR /&gt;Please anyone explains me and provides correct API to add to dlg for example button or any other control&lt;/DIV&gt;</description>
    <pubDate>Thu, 03 Aug 2023 11:41:42 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-08-03T11:41:42Z</dc:date>
    <item>
      <title>How to use DG::ModalDialog without GRC and add items to it</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-use-DG-ModalDialog-without-GRC-and-add-items-to-it/m-p/166286#M6740</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;We have &lt;BR /&gt;&lt;BR /&gt;static void Do_Dialog (void)&lt;BR /&gt;{&lt;BR /&gt;DG::ModalDialog dlg(DG::Rect(200,200,700,800));&lt;BR /&gt;dlg.SetTitle("The Title");&lt;BR /&gt;dlg.Invoke();&lt;BR /&gt;} // Do_Dialog &lt;BR /&gt;&lt;BR /&gt;dlg created without using any GRC resource. &lt;BR /&gt;Please anyone explains me and provides correct API to add to dlg for example button or any other control&lt;/DIV&gt;</description>
      <pubDate>Thu, 03 Aug 2023 11:41:42 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-use-DG-ModalDialog-without-GRC-and-add-items-to-it/m-p/166286#M6740</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-08-03T11:41:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to use DG::ModalDialog without GRC and add items to</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-use-DG-ModalDialog-without-GRC-and-add-items-to-it/m-p/166287#M6741</link>
      <description>&lt;BLOCKQUOTE&gt;nixonjan wrote:&lt;BR /&gt;We  have dlg created  without using any  GRC  resource. &lt;BR /&gt;
Please anyone explains me and provides correct API  to add to dlg  for example  button or any  other control&lt;/BLOCKQUOTE&gt;
Is there a good reason for not simply using a GRC? It's very straight-forward, and items in the GRC can be shown, hidden, moved etc as required.</description>
      <pubDate>Tue, 04 Aug 2009 10:58:18 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-use-DG-ModalDialog-without-GRC-and-add-items-to-it/m-p/166287#M6741</guid>
      <dc:creator>Ralph Wessel</dc:creator>
      <dc:date>2009-08-04T10:58:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to use DG::ModalDialog without GRC and add items to</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-use-DG-ModalDialog-without-GRC-and-add-items-to-it/m-p/166288#M6742</link>
      <description>Today I've made a palette without using GRC. I think you may add items to ModalDialog the same way:&lt;BR /&gt;

&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;class palD: public DG::Palette
{
public:
	palD( );
	virtual	~palD();

private:
	// Buttons
	DG::IconButton* btCreate;
	DG::IconButton* btSwitch;
};
&lt;/PRE&gt;

&lt;PRE&gt;&lt;I&gt;
&lt;/I&gt;// Constructor :
palD::palD( )
: DG::Palette( DG::Rect(DG::Point(0,0),193,28), paletteGUID, NoGrow, Close, LeftCaption, NormalFrame )
{
	ACAPI_RegisterModelessWindow( GetId(), PaletteAPIControlCallBack,
		API_PalEnabled_FloorPlan +
		API_PalEnabled_Section +
		API_PalEnabled_Detail +
		API_PalEnabled_Layout +
		API_PalEnabled_3D );

	// Add buttons :
	btCreate = new DG::IconButton( *this, DG::Rect( DG::Point(1,1),30,26) );
	btCreate-&amp;gt;SetIcon( DG::Icon( 32100 ) );
	btCreate-&amp;gt;Attach( *this );

	btSwitch = new DG::IconButton( *this, DG::Rect( DG::Point(65,1),30,26) );
	btSwitch-&amp;gt;SetIcon( DG::Icon( 32102 ) );
	btSwitch-&amp;gt;Attach( *this );

	btCreate-&amp;gt;Show();
	btSwitch-&amp;gt;Show();
}

palD::~palD()
{
	btCreate-&amp;gt;Detach( *this );
	btSwitch-&amp;gt;Detach( *this );
	delete btCreate;
	delete btSwitch;

	ACAPI_UnregisterModelessWindow( GetId() );
}
&lt;/PRE&gt;

I hope this helps...</description>
      <pubDate>Thu, 27 Aug 2009 14:24:26 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-use-DG-ModalDialog-without-GRC-and-add-items-to-it/m-p/166288#M6742</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-08-27T14:24:26Z</dc:date>
    </item>
  </channel>
</rss>

