Recent posts

#1
Runtime/AutoLISP / Tree and Checkboxes
Last post by pingoo666 - June 22, 2026, 02:41:36 AM
Hello,

I'm trying to add checkboxes to the tree control.

One image for the checked state, and one image for the unchecked.

The event Selchanged made the image change so it's ok.

But when I click on the same item it's desnt work.

So I use the OnClicked event with dcl-Tree-GetSelectedItem, but this function is always returning the actual selected item.

Did I missed something ?
#2
Studio/Dialog Editor / Blockview has problems with So...
Last post by Peter2 - June 11, 2026, 12:28:45 AM
Hi,

I made traffic signs to be used as "Blocks". Every sign is a single DWG, every sign consists of solid-hatches and a surrounding polyline. Also I made a modeless dialogue with "DWG-list" and "Blockview" to manage it.

This is what I have and got:
  • Original drawing:You cannot view this attachment.
  • Shown in DWG-list:You cannot view this attachment.
  • Shown in Blocklist when inserted: You cannot view this attachment.
  • Blocklist after "pan: You cannot view this attachment."

Any way to get a better result in Blockview?
#3
Runtime/AutoLISP / Re: dcl-MessageBox language
Last post by Danielm103 - June 05, 2026, 07:23:49 PM
I should also note that passing 0 commands Windows to display the button text in the default system user interface language of the host platform
#4
Runtime/AutoLISP / Re: dcl-MessageBox language
Last post by Danielm103 - June 05, 2026, 07:15:06 PM
Hi Owen, domenicomaria, it's required that the user have the language pack installed for the target language
I can't compile ODCL anymore since I removed all the vc80 stuff from my machine, here's a quick example

static int ADSPREFIX(foo(void))
 {
     int langid = 0;
     AcResBufPtr pArgs(acedGetArgs());
     if (pArgs)
     {
         switch (pArgs->restype)
         {
             case RTSHORT: langid = pArgs->resval.rint; break;
             case RTLONG: langid = pArgs->resval.rlong; break;
             default: break;
         }
         acedRetInt(MessageBoxExW(
             adsw_acadMainWnd(),
             L"Do you want to proceed with the action?",
             L"Confirmation",
             MB_YESNOCANCEL | MB_ICONQUESTION | MB_DEFBUTTON1, static_cast<WORD>(langid)
         ));

         return RSRSLT;
     }
     return RSERR;
 }


(foo 2052)

#5
Runtime/AutoLISP / Re: dcl-MessageBox language
Last post by owenwengerd - June 05, 2026, 10:12:05 AM
I doubt that anyone else will use it, but if you tested it and it works for your needs, I can add it.
#6
Runtime/AutoLISP / Re: dcl-MessageBox language
Last post by domenicomaria - June 05, 2026, 06:21:16 AM
        // ----- ads_dcl_messagebox symbol (do not rename)
        static int ads_dcl_messagebox(void)
        {
                struct resbuf *pArgs =acedGetArgs () ;
 
                CString sMessage;
                if( !GetStringArgument( pArgs, sMessage ) )
                        return RSERR; //arguments expected
 
                CString sTitle = theWorkspace.GetAppKey();
                GetStringArgument( pArgs, sTitle, true );
 
                DWORD dwMsgBoxType = 0;
                //optional arguments
                int fButtonStyle = 0;
                int fIconStyle = 0;
                bool bShowHelpButton = false;
                int languageid = 0;
                if( GetIntArgument( pArgs, fButtonStyle, true ) )
                {
                        //convert the arguments into windows messagebox type flags
                        switch (fButtonStyle)
                        {
                        case 1: dwMsgBoxType = MB_ABORTRETRYIGNORE|MB_DEFBUTTON1; break;
                        case -1: case 0: case 2: dwMsgBoxType = MB_OK|MB_DEFBUTTON1; break;
                        case 3: dwMsgBoxType = MB_OKCANCEL|MB_DEFBUTTON1; break;
                        case 4: dwMsgBoxType = MB_RETRYCANCEL|MB_DEFBUTTON1; break;
                        case 5: dwMsgBoxType = MB_YESNO|MB_DEFBUTTON1; break;
                        case 6: dwMsgBoxType = MB_YESNOCANCEL|MB_DEFBUTTON1; break;
                        case 11: dwMsgBoxType = MB_ABORTRETRYIGNORE|MB_DEFBUTTON2; break;
                        case 13: dwMsgBoxType = MB_OKCANCEL|MB_DEFBUTTON2; break;
                        case 14: dwMsgBoxType = MB_RETRYCANCEL|MB_DEFBUTTON2; break;
                        case 15: dwMsgBoxType = MB_YESNO|MB_DEFBUTTON2; break;
                        case 16: dwMsgBoxType = MB_YESNOCANCEL|MB_DEFBUTTON2; break;
                        case 21: dwMsgBoxType = MB_ABORTRETRYIGNORE|MB_DEFBUTTON3; break;
                        case 26: dwMsgBoxType = MB_YESNOCANCEL|MB_DEFBUTTON3; break;
                        default: HandleArgValueError( pArgs ); return RSERR; //invalid argument value
                        }
                        if( GetIntArgument( pArgs, fIconStyle, true ) )
                        {
                                switch (fIconStyle)
                                {
                                case 0: break;
                                case 1: dwMsgBoxType |= MB_ICONEXCLAMATION; break;
                                case 2: dwMsgBoxType |= MB_ICONINFORMATION; break;
                                case 3: dwMsgBoxType |= MB_ICONQUESTION; break;
                                case 4: dwMsgBoxType |= MB_ICONSTOP; break;
                                default: HandleArgValueError( pArgs ); return RSERR; //invalid argument value
                                }
                                GetBoolArgument( pArgs, bShowHelpButton, true );
                        }
                }
 
                GetIntArgument(pArgs, languageid, true);
 
                if( !AssertOutOfArgs( pArgs ) )
                        return RSERR;
 
                if( bShowHelpButton )
                        dwMsgBoxType |= MB_HELP;
 
                acedRetInt(MessageBoxExW(theArxWorkspace.GetTopmostModalForm(), sMessage, sTitle, dwMsgBoxType, languageid));
                return (RSRSLT) ;
        }


written by AKA Daniel


Owen,
do you think this code could be useful?
#7
Runtime/AutoLISP / Re: Sample "DWGList.odcl" - ho...
Last post by Peter2 - June 05, 2026, 03:54:18 AM
Hi Owen,
yes, this could be. Let's see if another answer will be posted, but for me - it works and it's OK.
#8
Runtime/AutoLISP / Re: Sample "DWGList.odcl" - ho...
Last post by owenwengerd - June 04, 2026, 07:15:23 PM
I don't remember how it works, but probably there is some sort of automatic linkage established by OpenDCL itself between the DwgList control and the first directory picker on the same form.
#9
Runtime/AutoLISP / Sample "DWGList.odcl" - how do...
Last post by Peter2 - June 04, 2026, 12:09:58 AM
Hi,

I see the sample "DWGList.odcl" and don't see how it works. There are ..
- 2 controls
- the Combobox has no defined Event
- I see no "linking" between DWGList and Combobox (both directions)

but nevertheless: changing the selection (folder) in one control changes also the folder in the other control.

It works, but I don't know how?

Thanks for advice!
#10
Runtime/AutoLISP / Re: SetColumnStyleList in Grid...
Last post by Peter2 - June 03, 2026, 12:55:22 AM
Solved.

I expected that the row height would expand automatically, but I have to set it separately (and all rows have the same height in a grid):

(dcl-Control-SetRowHeight htp/palette/Datenblatt 30)--