ObjectARX
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Close a modal dialog with autolisp

4 REPLIES 4
Reply
Message 1 of 5
Anonymous
453 Views, 4 Replies

Close a modal dialog with autolisp

In autolisp +dcl :

(start_dialog ) ....(done_dialog 0)  ,the lisp function "done_dialog" can end a modal dialog。

 

I wrote a  dialog in Arx, it can end it in modeless by call a lisp:

//in modeless

static int ads_startDlg(){

   testDlg = new Dialog(acedGetAcadFrame());

   testDlg->Create(IDD_DIALOG);

   testDlg->ShowWindow(SW_SHOW);

}

// close the dialog by call the lisp (enddlg)

static int ads_endDlg() 
{ testDlg->DestroyWindow();}

---------------------

//in modal

static int ads_startDlg(){

   testDlg = new Dialog(acedGetAcadFrame());

   testDlg->Create(IDD_DIALOG);

   testDlg->DoModal();

}

// ??close the dialog by call the lisp (enddlg)??

static int ads_endDlg() 
{ testDlg->EndDialog(-1);}

---------------------

in the dialog,a button is set to call the lisp (enddlg)

It cant close the modal dialog, is there any way to close it through lisp。

Labels (1)
4 REPLIES 4
Message 2 of 5
Alexander.Rivilis
in reply to: Anonymous

While modal dialog not closed - your code not return control to AutoCAD. So lisp expression can not been executed.

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"


Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Expert Elite Member

Message 3 of 5
Anonymous
in reply to: Alexander.Rivilis

acedRegFunc:

Registers an external function so that the ARX library can call it directly

looked up a lot of information and  wasted many hours .

Message 4 of 5
Alexander.Rivilis
in reply to: Anonymous


@Anonymous wrote:
acedRegFunc:

Registers an external function so that the ARX library can call it directly

looked up a lot of information and  wasted many hours .


Sorry but I do not understand how acedRegFunc can help you.

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"


Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Expert Elite Member

Message 5 of 5
Anonymous
in reply to: Alexander.Rivilis

If created by ARXWizards:

ACED_ADSSYMBOL_ENTRY_AUTO(CArxDiaglogApp, endDlg, true)   

the 'true' mean to registered 'endDlg'  as Arx function by acedRegFunc,

The function (acedInvoke ...)  will be executed immediately, without waiting for the dialog box to disappear( close the dialog ),At least the test is like this.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Forma Design Contest


AutoCAD Beta