BCX v8.1.9 is available for download

Started by MrBcx, November 16, 2024, 12:36:55 PM

Previous topic - Next topic

MrBcx

BCX 8.1.8 has been released.   

https://bcxbasiccoders.com/archives/YahooGroups/Bcx_Files_New/Bcx819.zip

~ MrBcx ~

REVISIONS:

*********************************************************************************************
2024/11/16       Changes in 8.1.9 from 8.1.8
*********************************************************************************************


Armando Rivera : Added WM_CONTEXTMENU to SplitterWndProc handler

Kevin Diggins  : Enabled ability to REDIM arrays passed as arguments. 
                 For example:

                 DIM DYNAMIC a [0] AS STRING
                 DIM DYNAMIC b [0] AS DOUBLE
                 DIM Cells
     
                 CALL Resize_String(ADDRESSOF a)
                 Cells = UBOUND_D(a)

                 FOR INT i = 0 TO Cells
                     IF LEN(a[i]) THEN PRINT a[i]
                 NEXT

                 PRINT

                 Resize_Double(ADDRESSOF b)
                 Cells = UBOUND_D(a)

                 FOR INT i = 0 TO Cells
                     IF b[i] THEN PRINT b[i]
                 NEXT
                 PAUSE

                 SUB Resize_String(BYREF R AS CHAR PTR PTR)
                     REDIM R$[10]       

                     FOR INT i = 0 TO 9
                         R$[i] = ""
                     NEXT

                     R$[0] = "this"
                     R$[1] = "is"
                     R$[2] = "a"
                     R$[3] = "very"
                     R$[4] = "good"
                     R$[5] = "test"
                 END SUB

                 SUB Resize_Double(BYREF R AS DOUBLE PTR)
                     REDIM R[10]     
   
                     FOR INT i = 0 TO 9
                         R[i] = 0
                     NEXT
   
                     R[0] = PI * 1
                     R[1] = PI * 2
                     R[2] = PI * 3
                     R[3] = PI * 4
                 END SUB

Kevin Diggins  : BCX now supports this traditional keyboard INPUT feature.
                 GW-BASIC, Qbasic, TurboBasic, and other traditional BASICS share several 
                 design features, as it pertains to the keyboard INPUT command behavior. 
                 INPUT age           ' No prompt, no space, no question mark
                 INPUT "Age" , age   ' "Prompt"    comma    variable produces ->>  Age68
                 INPUT "Age" ; age   ' "Prompt"  semicolon  variable produces ->>  Age? 68
                 
Kevin Diggins  : Added the following BCX translator DIRECTIVES that prevents the emission of
                 specific compiler headers, libraries, and pre-processor directives. 
                 These are best placed near the top of your source code before any of your
                 code gets translated.  They are case-insensitive and take no arguments.
                 ..................................................................................
                 $NO_VKKEYS, $NO_LIBS, $NO_PELLES, $NO_BORLAND, $NO_GCC_CLANG, $NO_MSVC, $NO_LCCWIN
                 ..................................................................................
                 If you don't use any of these new directives, the BCX generated C/C++
                 output file will contain all the headers, libraries, and pre-processor
                 directives for Pelles, LccWin32, MSVC, GCC, Clang, Embarcadero (Borland)
                 and the recently added Virtual Key (VK) values.  The $NO_LIBS directive
                 is useful when specifying static libraries inside our batch or make files.
                 
Kevin Diggins  : Below are commands that can optionally be used without enclosing the argument
                 list in parentheses. 
                 Statements like MyHndl = BCX_ARC Form,10,10,20,20,90,90,90,90,QBCOLOR(9)
                 are technically EXPRESSIONS because BCX_ARC can return a value.  Even so,
                 BCX will process this correctly, just as long as the BCX_ARC function is
                 not part of a larger EXPRESSION involving other unrelated terms.

                 Notice that MOST of BCX's built-in FUNCTIONS are not included in this list. 
                 Except as mentioned above and in the list below, FUNCTIONS MUST enclose their
                 arguments in parentheses.  Any corner cases should easily be remedied by simply
                 including the missing parentheses.

                 The bottom line: 

                 The last argument in each of these statements/functions must be the last argument
                 on the line of code that is being parsed by BCX.  If it's not, the programmer
                 MUST use parentheses to enclose the argument list. 

                 bcx_arc             bcx_bitmap         bcx_blackrect       bcx_blit           bcx_blit_sprite 
                 bcx_blit_stretch    bcx_bmpbutton      bcx_buffer_start    bcx_buffer_stop    bcx_button 
                 bcx_checkbox        bcx_circle         bcx_combobox        bcx_control        bcx_datepick 
                 bcx_dialog          bcx_edit           bcx_ellipse         bcx_floodfill      bcx_form 
                 bcx_framewnd        bcx_grayrect       bcx_group           bcx_icon           bcx_initgui 
                 bcx_input           bcx_label          bcx_line            bcx_lineto         bcx_listbox 
                 bcx_listview        bcx_mdi_msgpump    bcx_mdialog         bcx_msgpump        bcx_olepicture 
                 bcx_pie             bcx_polar_line     bcx_polar_pset      bcx_polybezier     bcx_polygon 
                 bcx_polyline        bcx_preset         bcx_printex         bcx_progressbar    bcx_pset 
                 bcx_put             bcx_radio          bcx_rectangle       bcx_regwnd         bcx_resize 
                 bcx_richedit        bcx_roundrect      bcx_set_font        bcx_set_form_color bcx_set_text 
                 bcx_setbkgrdbrush   bcx_setclassstyle  bcx_setclientsize   bcx_setconsolesize bcx_setcursor 
                 bcx_seticon         bcx_seticonsm      bcx_setmetric       bcx_setsplitpos    bcx_slider 
                 bcx_splitter        bcx_status         bcx_tab             bcx_tile           bcx_toolbar 
                 bcx_tooltip         bcx_treeview       bcx_triangle        bcx_updown         bcx_whiterect 
                 bcx_wnd             center             clipboard_setbitmap clipboard_settext  concat 
                 createregint        createregstring    draw                drawtransbmp       editloadfile 
                 enddraw             dsplit             hide                infobox            listboxloadfile
                 mkpath              modstyle           playwav             putc               sendmessage 
                 sndmsg              set_bcx_bitmap     set_bcx_bitmap2     set_bcx_bmpbutton  set_bcx_icon 
                 setattr             setwindowrtftext   show                showmodal          sleep 
                 sound               split              startdraw           textmode           uncom 

Robert Wishlaw : Added PUTC (byte_expression, FilePtr) to the BCX lexicon as a complement to GETC(FP#)
                 PUTC will accept QBASIC style file pointers.  Here is a compilable example:
               
                         OPEN "test.txt" FOR OUTPUT AS #1
                         FOR CHAR i = 65 TO 70
                             PUTC #1, i
                         NEXT
                         PUTC #1, 13  ' 13 = Carriage Return 
                         PUTC #1, 10  ' 10 = Line Feed
                         FLUSH #1     ' optional but always a good idea to FLUSH when you're done :-)
                         CLOSE #1 

Kevin Diggins  : Added BCX_Triangle to the set of BCX graphics commands.
                 Syntax: BCX_TRIANGLE(hWnd, x1, y1, x2, y2, x3, y3, RgbColor, FillFlag [, hdc as HDC] )
                 GUI "Triangle", PIXELS

                 SUB FORMLOAD
                     GLOBAL AS HWND Form1
                     GLOBAL AS HWND Canvas
                     Form1 = BCX_FORM ("Triangle", 0, 0, 800, 800)
                     Canvas = BCX_BITMAP(0, Form1, 1000, 0, 0, 800, 800)
                     CENTER Form1
                     SHOW   Form1
                     CALL Drawit
                 END SUB

                 BEGIN EVENTS
                     SELECT CASE CBMSG
                       CASE WM_QUIT, WM_CLOSE, WM_DESTROY
                           END
                     END SELECT
                 END EVENTS


                 SUB Drawit
                     DIM RAW hDestDC AS HDC
                     hDestDC = STARTDRAW(Canvas)
                     BCX_TRIANGLE(0, 200, 500, 600, 500, 400, 400, QBCOLOR(1), 1, hDestDC)
                     ENDDRAW(Canvas, hDestDC)
                 END SUB


Kevin Diggins  : Included 3 more PowerBasic inspired macros dealing with callback messages.
                 CBNMCODE returns the notification message describing the event. 
                 CBNMHWND returns the handle of the control that sent the message. 
                 CBNMID   returns the control's ID number assigned at its creation.             
               
                 CBNMHWND equates to ((LPNMHDR)lParam)->hwndFrom
                 CBNMCODE equates to ((LPNMHDR)lParam)->code
                 CBNMID   equates to ((LPNMHDR)lParam)->idFrom
               
                 These new macros replace statements like these:

                 IF CB((LPNMHDR)lParam)->hwndFrom = ToolBar1 AND ((LPNMHDR)lParam)->code = NM_CLICK THEN ...
                                       --- with ---
                 IF CBNMHWND = ToolBar1 AND CBNMCODE = NM_CLICK THEN
                                       --- and ---
                 IF ((LPNMHDR)lParam)->idFrom = IDC_CUSTOMLISTBOX1 THEN ...
                                       --- with ---
                 IF CBNMID = IDC_CUSTOMLISTBOX1 THEN ...

Kevin Diggins  : Removed internal Inset() and replaced calls to it with INSTR ANY statements.

Kevin Diggins  : Ongoing formatting improvements to the source, output and runtime code


jbk


dragon57


Coda