<?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 Re: DGAppendDialogItem broken? in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/DGAppendDialogItem-broken/m-p/217543#M5709</link>
    <description>For example, the following code displays a blank dialog box (the button is not added).&lt;BR /&gt;

&lt;PRE&gt;static short DGCALLBACK	TestDlgCallBack (short message, short dialId, short itemId, DGUserData /*userData*/, DGMessageData /*msgData*/) {
	switch (message) {
		case DG_MSG_INIT: 
			{
				short newItem = DGAppendDialogItem (dialId, DG_ITM_BUTTON, DG_BT_TEXT, NULL, 5, 5, 20, 20);
				DBPrintf("new item %d added\n", newItem);
			}
			break;
		case DG_MSG_CLOSE:
			break;
		case DG_MSG_CLICK:
			switch (itemId) {
				//case 2: // Close button
				case DG_CLOSEBOX:
					return(1);
					break;
				default:
					break;
			}
		default:
			break;
	}
	return 0;
}

void openTestDlg() {
	DGBlankModalDialog (200, 200, DG_DLG_HGROW | DG_DLG_VGROW, 0, DG_DLG_THICKFRAME, TestDlgCallBack, NULL);
}
&lt;/PRE&gt;</description>
    <pubDate>Wed, 09 Jan 2013 08:35:42 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2013-01-09T08:35:42Z</dc:date>
    <item>
      <title>DGAppendDialogItem broken?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/DGAppendDialogItem-broken/m-p/217542#M5708</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;Hi, I am wondering what you need to do to get DGAppendDialogItem to create an item on a modal dialog. I've tried calling it inside and outside DG_MSG_INIT, tried creating different types of controls, and tried on pre-made dialogs and DGBlankModalDialog. And I haven't yet been able to get a new control to appear.&lt;BR /&gt;&lt;BR /&gt;Is there something special you need to do to get this function to work?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;/DIV&gt;</description>
      <pubDate>Wed, 02 Aug 2023 13:28:14 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/DGAppendDialogItem-broken/m-p/217542#M5708</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-08-02T13:28:14Z</dc:date>
    </item>
    <item>
      <title>Re: DGAppendDialogItem broken?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/DGAppendDialogItem-broken/m-p/217543#M5709</link>
      <description>For example, the following code displays a blank dialog box (the button is not added).&lt;BR /&gt;

&lt;PRE&gt;static short DGCALLBACK	TestDlgCallBack (short message, short dialId, short itemId, DGUserData /*userData*/, DGMessageData /*msgData*/) {
	switch (message) {
		case DG_MSG_INIT: 
			{
				short newItem = DGAppendDialogItem (dialId, DG_ITM_BUTTON, DG_BT_TEXT, NULL, 5, 5, 20, 20);
				DBPrintf("new item %d added\n", newItem);
			}
			break;
		case DG_MSG_CLOSE:
			break;
		case DG_MSG_CLICK:
			switch (itemId) {
				//case 2: // Close button
				case DG_CLOSEBOX:
					return(1);
					break;
				default:
					break;
			}
		default:
			break;
	}
	return 0;
}

void openTestDlg() {
	DGBlankModalDialog (200, 200, DG_DLG_HGROW | DG_DLG_VGROW, 0, DG_DLG_THICKFRAME, TestDlgCallBack, NULL);
}
&lt;/PRE&gt;</description>
      <pubDate>Wed, 09 Jan 2013 08:35:42 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/DGAppendDialogItem-broken/m-p/217543#M5709</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-01-09T08:35:42Z</dc:date>
    </item>
    <item>
      <title>Re: DGAppendDialogItem broken?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/DGAppendDialogItem-broken/m-p/217544#M5710</link>
      <description>Hi paulk, &lt;BR /&gt;
 &lt;BR /&gt;
After using DGAppendDialogItem, you should call DGShowItem to make the new item visible: &lt;BR /&gt;
 
&lt;PRE&gt;  // add new item: 
short newItem = DGAppendDialogItem (dialId, DG_ITM_CHECKBOX, DG_BT_TEXT, 0, 206, 7, 60, 18); 

  // set font, text and others: 
DGSetItemFont (dialId, newItem, DG_IS_EXTRASMALL); 
DGSetItemText (dialId, newItem, "NEW"); 
// ...

  // make it visible: 
DGShowItem (dialId, newItem); 
&lt;/PRE&gt; &lt;BR /&gt;
 &lt;BR /&gt;
Best, &lt;BR /&gt;
Tibi</description>
      <pubDate>Thu, 24 Jan 2013 13:09:07 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/DGAppendDialogItem-broken/m-p/217544#M5710</guid>
      <dc:creator>Tibor Lorantfy</dc:creator>
      <dc:date>2013-01-24T13:09:07Z</dc:date>
    </item>
    <item>
      <title>Re: DGAppendDialogItem broken?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/DGAppendDialogItem-broken/m-p/217545#M5711</link>
      <description>Thanks Tibi&lt;BR /&gt;
&lt;BR /&gt;
That info should be added to the API documentation.&lt;BR /&gt;
&lt;BR /&gt;
Paul</description>
      <pubDate>Wed, 30 Jan 2013 02:00:11 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/DGAppendDialogItem-broken/m-p/217545#M5711</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-01-30T02:00:11Z</dc:date>
    </item>
  </channel>
</rss>

