Recent posts

#1
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
#2
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)

#3
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.
#4
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?
#5
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.
#6
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.
#7
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!
#8
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)--
#9
Runtime/AutoLISP / SetColumnStyleList in Grid - m...
Last post by Peter2 - June 02, 2026, 05:46:05 AM
I have a grid where I want to use "multiline text" with "cellstyle 13".
I create the columns, set them to "13", check them with result 13, check the cell with result -1 (which says cellstyle comes from column).

Everything looks fine, but the result is still a "one - line -text". What could be wrong?

    (dcl-Grid-Clear htp/palette/Datenblatt)

    (dcl-Grid-AddColumns htp/palette/Datenblatt '(("Titel" 0 150) ("Beschreibung" 0 500) ("Steuerelement" 0 150)))
    (dcl-Control-SetColumnStyleList htp/palette/Datenblatt 13 13 13)

    (dcl-Control-GetColumnStyleList htp/palette/Datenblatt)
    (13 13 13)

    (dcl-Grid-GetCellStyle htp/palette/Datenblatt 2 2)
    -1

---
#10
GERMAN / "Add Cancel" - Button unglück...
Last post by Peter2 - June 02, 2026, 02:37:45 AM
Bei den Ereignissen gibt es den Buton "Add Cancel" - der ist mit "Abbrechen" etwas unpräzise übersetzt. Vielleicht irgendwas mit "Abbrechen nutzen" oder "Abbrechbefehl hinzufügen" ....