<?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: How to put a user control into a listbox? in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-put-a-user-control-into-a-listbox/m-p/644625#M10056</link>
    <description>&lt;P&gt;Try to place UserControl's line before MultiSelList line in grc .&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 26 Dec 2024 15:46:14 GMT</pubDate>
    <dc:creator>Oleg</dc:creator>
    <dc:date>2024-12-26T15:46:14Z</dc:date>
    <item>
      <title>How to put a user control into a listbox?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-put-a-user-control-into-a-listbox/m-p/644618#M10055</link>
      <description>&lt;P&gt;I program C++/Add-on in ArchiCAD27 / Visual StudioC++2019 / Windows 10.&lt;BR /&gt;&lt;BR /&gt;I try UserControl(Pen Type) in ListBox.&lt;BR /&gt;But can't put&amp;nbsp;user control into a listbox,&lt;BR /&gt;How to put a user control into a listbox?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="cpp"&gt;1)grc
/* [11] */ MultiSelList 21 72 903 356 LargePlain PartialItems 21 HasHeader 21
/* [12] */ UserControl 55 451 180 40 257 0x0001 0x0000 0 



2)cpp : OpenDialog()

res = DGModalDialog(
ACAPI_GetOwnResModule()
, resID //grcでのdialog/palette定義ID
, ACAPI_GetOwnResModule()
, staticDlgMsgCallBack
, (DGUserData)_this
);
3)cpp : MsgInit() Event
//UserControl
API_UCCallbackType ucb;
BNZeroMemory(&amp;amp;ucb, sizeof(ucb));
ucb.dialogID = this-&amp;gt;dialID;
ucb.type = APIUserControlType_Pen;
ucb.itemID = ctrl_id;//ctrl_id==12
ACAPI_Dialog_SetUserControlCallback(&amp;amp;ucb);

4)cpp : MakeListBox()
//ctrl_id==12
NiArchi::DGSetItemWidth(dial_id, ctrl_id, w);
NiArchi::DGSetItemHeight(dial_id, ctrl_id, h);
DGSetItemValLong(this-&amp;gt;dialID, ctrl_id, (short)color);
DGListSetDialItemOnTabField(dial_id, grid_id, col, ctrl_id);&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;&amp;nbsp;If the control_id is a popup or button, it will be displayed correctly in the ListBox.&lt;BR /&gt;What should I do for a usercontrol?&lt;BR /&gt;If possible, I would like to handle everything with DG functions, rather than deriving from the Dialog class.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Mon, 30 Dec 2024 13:17:15 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-put-a-user-control-into-a-listbox/m-p/644618#M10055</guid>
      <dc:creator>nishida_jp</dc:creator>
      <dc:date>2024-12-30T13:17:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to put a user control into a listbox?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-put-a-user-control-into-a-listbox/m-p/644625#M10056</link>
      <description>&lt;P&gt;Try to place UserControl's line before MultiSelList line in grc .&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Dec 2024 15:46:14 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-put-a-user-control-into-a-listbox/m-p/644625#M10056</guid>
      <dc:creator>Oleg</dc:creator>
      <dc:date>2024-12-26T15:46:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to put a user control into a listbox?</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-put-a-user-control-into-a-listbox/m-p/645480#M10075</link>
      <description>&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;I try it.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jan 2025 23:10:00 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-put-a-user-control-into-a-listbox/m-p/645480#M10075</guid>
      <dc:creator>nishida_jp</dc:creator>
      <dc:date>2025-01-08T23:10:00Z</dc:date>
    </item>
  </channel>
</rss>

