Archicad C++ API
About Archicad add-on development using the C++ API.

How to use ModalDialog ????

Anonymous
Not applicable
Hello,

i'm trying to use modalDialog class so as to have a window with a textEdit, a label and two button( cancel and ok).

I tried this :

- In GRC file :
'GDLG'  4000  Modal   100  100  100  100  "Test Window" {
TextEdit   20  20  60  20  SmallPlain   255
}
- In cpp file :
DG::ModalDialog* modalWindow = new DG::ModalDialog(4000);
if(!modalWindow->Invoke())
    ACAPI_WriteReport("Invoke failed",true);
But the invoke always failed.
May be my grc file is not correctly written, i don't know.
If somebody already used Modaldialog and could help me, i would thank him a lot.

Thank you.

Sébastien
10 REPLIES 10
Anonymous
Not applicable
Hi,

Thank you very much,

you were right, i changed the "return 0" to "return 1" and everything work.

thank you.