Modal Dialogs

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2021-03-06
11:29 PM
- last edited on
‎2021-09-14
09:56 AM
by
Noemi Balogh
‎2021-03-06
11:29 PM
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.
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 11 - Visual Studio 2022; ArchiCAD 27
Windows 11 - Visual Studio 2022; ArchiCAD 27
Labels:
- Labels:
-
Add-On (C++)
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎2021-03-09 02:54 PM
‎2021-03-09
02:54 PM
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.
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.