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

Calling QSELECT from a dialog.

1 REPLY 1
Reply
Message 1 of 2
William_Gonzales_Sanchez
308 Views, 1 Reply

Calling QSELECT from a dialog.

Hello everybody,
I have a dialog that works with selected objects and I have add a button that hides the dialog and calls the QSELECT command ( using 'acedCommand()' ), the QSELECT dialog is showed but the problem appears when I select the "Select objects" button on the Quick Select dialog box: the QSELECT dialog is hidden but the command line never gets the focus, so the dialogs are not shown again and AutoCAD becomes "dead".
How can I solve this problem? It seems that the focus must be placed in the command line before calling 'acedCommand()', how can I do it? Also, is there a way to use the QSELECT dialog with ARX and avoid calling the QSELECT command?

I am using AutoCAD 2008. I know that there is a transparent command (FILTER) but the program's owner prefers QSELECT.

Thanks in advance,
William Gonzales
1 REPLY 1
Message 2 of 2
Anonymous

William,

After you hide your dialog, you need to Enable the AutoCAD window. Then
when you re-show yours, you need to Disable the AutoCAD window. Here's a
snippet of my code where I do this very thing ...

ShowWindow( hDlgWnd, SW_HIDE );
EnableWindow( GetParent( hDlgWnd ), TRUE );
SetFocus( GetParent( hDlgWnd ));
nRet = acedGetDist( NULL, _T("Distance: "), &dHgt );
EnableWindow( GetParent( hDlgWnd ), FALSE );
ShowWindow( hDlgWnd, SW_SHOW );

hDlgWnd is my Dialog Window. Since it was created with AutoCAD as the
owner, GetParent( hDlgWnd ) will return the AutoCAD window.

Hope this helps,
Joe

wrote in message news:6217836@discussion.autodesk.com...
Hello everybody,
I have a dialog that works with selected objects and I have add a button
that hides the dialog and calls the QSELECT command ( using
'acedCommand()' ), the QSELECT dialog is showed but the problem appears when
I select the "Select objects" button on the Quick Select dialog box: the
QSELECT dialog is hidden but the command line never gets the focus, so the
dialogs are not shown again and AutoCAD becomes "dead".
How can I solve this problem? It seems that the focus must be placed in the
command line before calling 'acedCommand()', how can I do it? Also, is there
a way to use the QSELECT dialog with ARX and avoid calling the QSELECT
command?

I am using AutoCAD 2008. I know that there is a transparent command (FILTER)
but the program's owner prefers QSELECT.

Thanks in advance,
William Gonzales

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

Post to forums  

Autodesk Design & Make Report

”Boost