<?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 Fire Click Event from Push Button in Dialog in Archicad C++ API</title>
    <link>https://community.graphisoft.com/t5/Archicad-C-API/How-To-Fire-Click-Event-from-Push-Button-in-Dialog/m-p/305196#M2251</link>
    <description>&lt;P&gt;You can't generate a click evet from the code. But if the click handling statements are in a standalone function, you can call that function in the ButtonClicked notification and anywhere else.&lt;/P&gt;</description>
    <pubDate>Wed, 08 Sep 2021 07:59:53 GMT</pubDate>
    <dc:creator>Miklos Vegh</dc:creator>
    <dc:date>2021-09-08T07:59:53Z</dc:date>
    <item>
      <title>How To Fire Click Event from Push Button in Dialog</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-To-Fire-Click-Event-from-Push-Button-in-Dialog/m-p/224589#M2249</link>
      <description>&lt;DIV class="actalk-migrated-content"&gt;Please teach me.&lt;BR /&gt;How To Fire Click Event from Push Button in Dialog on C++ Code.&lt;BR /&gt;DG_Command ?&lt;/DIV&gt;</description>
      <pubDate>Tue, 14 Sep 2021 07:20:09 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-To-Fire-Click-Event-from-Push-Button-in-Dialog/m-p/224589#M2249</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-09-14T07:20:09Z</dc:date>
    </item>
    <item>
      <title>Re: How To Fire Click Event from Push Button in Dialog</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-To-Fire-Click-Event-from-Push-Button-in-Dialog/m-p/224590#M2250</link>
      <description>&lt;P&gt;I give you an example of how I do it:&lt;BR /&gt;&lt;BR /&gt;The header of your dialog class:&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;class ExampleDialog : public DG::ModalDialog, 
    public DG::PanelObserver, 
    public DG::ButtonItemObserver, 
    public DG::CompoundItemObserver 
{ 
public: 
    ExampleDialog (GSResModule dialResModule); 
    ~ExampleDialog (); 

private: 
    virtual void PanelOpened(const DG::PanelOpenEvent&amp;amp; ev) override; 
    virtual void ButtonClicked(const DG::ButtonClickEvent&amp;amp; ev) override; 

    static const short DIALOG_ID = 32530; 
    enum 
    { 
        ButtonID = 1, // Id from your .grc file 
    }; 

    DG::Button button_; 
};&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;Cpp file :&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;ExampleDialog ::ExampleDialog (GSResModule dialResModule) :
    DG::ModalDialog(dialResModule, DIALOG_ID, dialResModule),
    button_(GetReference(), ButtonID),

{
    AttachToAllItems(*this);
}

void ExampleDialog ::ButtonClicked(const DG::ButtonClickEvent&amp;amp; ev)
{
   ...
}
&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;If something is not clear ask questions, I will try to answer.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Sep 2021 11:01:42 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-To-Fire-Click-Event-from-Push-Button-in-Dialog/m-p/224590#M2250</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-09-08T11:01:42Z</dc:date>
    </item>
    <item>
      <title>Re: How To Fire Click Event from Push Button in Dialog</title>
      <link>https://community.graphisoft.com/t5/Archicad-C-API/How-To-Fire-Click-Event-from-Push-Button-in-Dialog/m-p/305196#M2251</link>
      <description>&lt;P&gt;You can't generate a click evet from the code. But if the click handling statements are in a standalone function, you can call that function in the ButtonClicked notification and anywhere else.&lt;/P&gt;</description>
      <pubDate>Wed, 08 Sep 2021 07:59:53 GMT</pubDate>
      <guid>https://community.graphisoft.com/t5/Archicad-C-API/How-To-Fire-Click-Event-from-Push-Button-in-Dialog/m-p/305196#M2251</guid>
      <dc:creator>Miklos Vegh</dc:creator>
      <dc:date>2021-09-08T07:59:53Z</dc:date>
    </item>
  </channel>
</rss>

