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

How to focus back to CAD?

2 REPLIES 2
SOLVED
Reply
Message 1 of 3
D_D_K
248 Views, 2 Replies

How to focus back to CAD?

Hi,

I use this code to create modeless dialog:

w= new Dialog(CWnd::FromHandle(adsw_acadDocWnd());


Normally when the dialog closed, then the focus is set back to Cad.
However, on Cad25 it seems not to return. If I use Setfocus, the screen flickers occasionally.

Even in debugging, after closing, it will navigate to another window (chrome, vs,..).

 

Is there any way to fix this?

2 REPLIES 2
Message 2 of 3
daniel_cadext
in reply to: D_D_K

If it’s modeless, shouldn’t the owner be the main frame, or adsw_acadMainWnd?

Are you handling WM_ACAD_KEEPFOCUS?

I don’t know the answer, just things I would look at

Python for AutoCAD, Python wrappers for ARX https://github.com/CEXT-Dan/PyRx
Message 3 of 3
D_D_K
in reply to: daniel_cadext

Hi @daniel_cadext ,

Thanks for your new idea,
I have seen the problem. It worked.

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

Post to forums  

Autodesk Customer Advisory Groups


Autodesk Design & Make Report