<?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 send a message to the created palette in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-send-a-message-to-the-created-palette/m-p/355592#M1620</link>
    <description>&lt;P&gt;&lt;SPAN class=""&gt;hello. I am developing using API Development Kit 25.3002 (Windows).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;I would like to send a DG_MSG_CHANGE message to the radio buttons in the palette I created. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;The DGSendMessage function was described in the manual, so I tried to use it I'm having trouble finding an implementation. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;I found the DGSendUserMessage function instead, but I don't know how to give the third argument DG::EventArg&amp;amp; msgData.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Is it correct to use DGSendUserMessage to send a message to the palette in the first place? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;In addition, I tried to get the window handle with ACAPI_GetMainWindow or DGGetDialogWindow and execute the WindowsAPI SendMessage function.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;It was no good. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Is there a way to send a message to the created palette? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Thank you very much.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 11 Sep 2022 03:33:39 GMT</pubDate>
    <dc:creator>satoshi shimokura</dc:creator>
    <dc:date>2022-09-11T03:33:39Z</dc:date>
    <item>
      <title>How to send a message to the created palette</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-send-a-message-to-the-created-palette/m-p/355592#M1620</link>
      <description>&lt;P&gt;&lt;SPAN class=""&gt;hello. I am developing using API Development Kit 25.3002 (Windows).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;I would like to send a DG_MSG_CHANGE message to the radio buttons in the palette I created. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;The DGSendMessage function was described in the manual, so I tried to use it I'm having trouble finding an implementation. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;I found the DGSendUserMessage function instead, but I don't know how to give the third argument DG::EventArg&amp;amp; msgData.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Is it correct to use DGSendUserMessage to send a message to the palette in the first place? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;In addition, I tried to get the window handle with ACAPI_GetMainWindow or DGGetDialogWindow and execute the WindowsAPI SendMessage function.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;It was no good. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Is there a way to send a message to the created palette? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;Thank you very much.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 11 Sep 2022 03:33:39 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-send-a-message-to-the-created-palette/m-p/355592#M1620</guid>
      <dc:creator>satoshi shimokura</dc:creator>
      <dc:date>2022-09-11T03:33:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to send a message to the created palette</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-send-a-message-to-the-created-palette/m-p/355864#M1621</link>
      <description>&lt;P&gt;Hi!&lt;BR /&gt;&lt;BR /&gt;I also can't find the DGSendMessage function although it's documented. This is weird. But it has the same signature as the DialogHandlers itself. So you could just call the DialogHandler of the palette directly; that's actually something I've already used before:&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;DialogHandler (DG_MSG_CHANGE, dlgID, itemID, msgData);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;msgData can be "anything" if you don't use it in the DialogHandler. Otherwise you can check the used values in the documentation of the Dialog messages.&lt;BR /&gt;&lt;BR /&gt;Hope that helps,&lt;BR /&gt;Bernd&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2022 09:04:58 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-send-a-message-to-the-created-palette/m-p/355864#M1621</guid>
      <dc:creator>BerndSchwarzenbacher</dc:creator>
      <dc:date>2022-09-14T09:04:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to send a message to the created palette</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-send-a-message-to-the-created-palette/m-p/356115#M1622</link>
      <description>&lt;P&gt;As bschwb says&lt;BR /&gt;Give up sending the message itself,&lt;BR /&gt;Although it is not DialogHandler, I achieved my goal by calling the target function directly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for taking your precious time to reply.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;However, it is described in the DialogManager item of the manual (e.g. RadioButton.html)&lt;BR /&gt;Messages like DG_MSG_CHANGE and DG_MSG_DOUBLECLICK are the mystery.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, in the case of RadioButton, when the button is pressed, instead of PaletteAPIControlCallBack RadioItemChanged is called.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Where can I receive DG_MSG_CHANGE when this radio button is operated?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This may be an immature question. very sorry.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 10:25:39 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-send-a-message-to-the-created-palette/m-p/356115#M1622</guid>
      <dc:creator>satoshi shimokura</dc:creator>
      <dc:date>2022-09-16T10:25:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to send a message to the created palette</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-send-a-message-to-the-created-palette/m-p/356327#M1623</link>
      <description>&lt;P&gt;If RadioItemChanged is called, then you are using the newer "C++" class style of UI handling for your palette.&lt;BR /&gt;From your previous question I wrongly assumed that you were using the old "C-style", Sorry!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I cite myself from a different answer to clarify further:&lt;/P&gt;&lt;P&gt;There are 2 "styles" of handling Dialogs and their items. The "older" C style (which is decently documented in the offline documentation.). This style uses Handlers and you need to register them. As a contrast there's the "newer" C++ style which is less documented unfortunately. Here you create Classes/Objects for your Dialogs, Items etc. Instead of Handlers you work more with Event Observers. It's a rough distinction but I hope it helps anyway.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;So in your case I think you are using the newer C++ style. So the DG_MSG_CHANGE messages etc. are not really relevant. I would recommend you stay completely in the C++ Style and use the correct observer classes and events.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;So instead of receiving DG_MSG_CHANGE, you work with the RadioItemChanged method. And instead of receiving DG_MSG_DOUBLECLICK you work with the RadioItemDoubleClicked method.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Feel free to ask further questions if this doesn't help.&lt;BR /&gt;Bernd&lt;/P&gt;</description>
      <pubDate>Mon, 19 Sep 2022 10:09:19 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-send-a-message-to-the-created-palette/m-p/356327#M1623</guid>
      <dc:creator>BerndSchwarzenbacher</dc:creator>
      <dc:date>2022-09-19T10:09:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to send a message to the created palette</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-send-a-message-to-the-created-palette/m-p/356488#M1624</link>
      <description>&lt;P&gt;bschwb&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I didn't know there was such a thing as the old "C-style"&lt;BR /&gt;I posted with too little information.&lt;/P&gt;&lt;P&gt;I'm sorry.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I was able to know that such a thing exists through this exchange, and I learned a lot.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;The purpose itself was achieved by the first response I received.&lt;BR /&gt;As you said, I will continue to use the new "C++ style".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much for your kind reply.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2022 09:24:40 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-send-a-message-to-the-created-palette/m-p/356488#M1624</guid>
      <dc:creator>satoshi shimokura</dc:creator>
      <dc:date>2022-09-20T09:24:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to send a message to the created palette</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-send-a-message-to-the-created-palette/m-p/361847#M1625</link>
      <description>&lt;PRE&gt;&lt;SPAN class=""&gt;If you get a pointer to a listbox in C++, then this works:

SingleSelListBox *lb;
lb-&amp;gt;SelectItem(item);
DG::ItemSelectionChangeEventArg eventarg;
lb-&amp;gt;onSelectionChanged.NotifyAll(*lb,eventarg);&lt;/SPAN&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 12 Nov 2022 06:25:01 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-send-a-message-to-the-created-palette/m-p/361847#M1625</guid>
      <dc:creator>LABPP</dc:creator>
      <dc:date>2022-11-12T06:25:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to send a message to the created palette</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-send-a-message-to-the-created-palette/m-p/361854#M1626</link>
      <description>&lt;PRE&gt;&lt;SPAN class=""&gt;LABPP

I tried it with my own code and it certainly worked.
It's a function that's not even in the manual, so I'd be very grateful if you could let me know.

I would like to try this method as well.
Thank you.&lt;/SPAN&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 12 Nov 2022 12:32:13 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-send-a-message-to-the-created-palette/m-p/361854#M1626</guid>
      <dc:creator>satoshi shimokura</dc:creator>
      <dc:date>2022-11-12T12:32:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to send a message to the created palette</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-send-a-message-to-the-created-palette/m-p/362132#M1627</link>
      <description>&lt;P&gt;Hi, Satoshi!&lt;BR /&gt;In the documentation for API Archicad 17, there was still a full description of dialog classes and control elements in dialogs.&lt;BR /&gt;If necessary, I will send.&lt;BR /&gt;Some new changed properties have to be seen in .hpp files.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Nov 2022 08:34:23 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-send-a-message-to-the-created-palette/m-p/362132#M1627</guid>
      <dc:creator>LABPP</dc:creator>
      <dc:date>2022-11-16T08:34:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to send a message to the created palette</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-send-a-message-to-the-created-palette/m-p/362152#M1628</link>
      <description>&lt;PRE&gt;&lt;SPAN class=""&gt;LABPP

I am very grateful for that.
Please by all means.&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Nov 2022 12:16:17 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-send-a-message-to-the-created-palette/m-p/362152#M1628</guid>
      <dc:creator>satoshi shimokura</dc:creator>
      <dc:date>2022-11-16T12:16:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to send a message to the created palette</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-send-a-message-to-the-created-palette/m-p/362178#M1629</link>
      <description>&lt;P&gt;Satoshi, send me Your email to mail [at] labpp [dot] ru&lt;/P&gt;</description>
      <pubDate>Sun, 20 Nov 2022 17:03:00 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-send-a-message-to-the-created-palette/m-p/362178#M1629</guid>
      <dc:creator>LABPP</dc:creator>
      <dc:date>2022-11-20T17:03:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to send a message to the created palette</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-to-send-a-message-to-the-created-palette/m-p/362531#M1630</link>
      <description>&lt;PRE&gt;&lt;SPAN class=""&gt;bschwb
LABPP

Thanks to you, we were able to implement the targeted function, and it is currently in operation.
Thank you very much for your kind guidance.

We will mark it as resolved.&lt;/SPAN&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 19 Nov 2022 03:51:15 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-to-send-a-message-to-the-created-palette/m-p/362531#M1630</guid>
      <dc:creator>satoshi shimokura</dc:creator>
      <dc:date>2022-11-19T03:51:15Z</dc:date>
    </item>
  </channel>
</rss>

