cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
Developer forum

Modal Dialogs

poco2013
Advisor
I am trying to create Modal Dialogs programmatically in a Add-On and I can not find a example to follow. All of the examples in DG-Test use the grc resource.

Can anyone supply,or point me to, a example of creating a Modal Dialog from scratch stating with DGBLANKMODALDIALOG and building from there?? Just simple Buttons and Text Edit Boxes.

I'm having particular trouble with the CallBack.
Gerry



Windows 10 - Visual Studio 2019; ArchiCAD 26
1 REPLY 1

Tibor Lorantfy
Graphisoft Alumni
Graphisoft Alumni
Hi Gerry,

The DG module of Graphisoft has an old deprecated C interface and a newer C++ interface.
Using the old C interface you have to define callbacks and handle each event. It seems you're struggling with that...
I recommend you to use the C++ interface. It's much more easier, just simply inherit your class from DG::ModalDialog base class. If you want to handle an event (for example button click), then override the corresponding virtual function.
There is a very simple Modal dialog example at our blog. I recommend you to start with that.
There is also a little more complex example at our blog, the Archicad Maze Generator dialog.

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!