User Tools

Site Tools


creating_20a_20custom_20graphics_20control

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
creating_20a_20custom_20graphics_20control [2018/03/31 13:19] – external edit 127.0.0.1creating_20a_20custom_20graphics_20control [2024/01/05 00:22] (current) – external edit 127.0.0.1
Line 2: Line 2:
  
 //by Richard Russell, August 2014//\\ \\  BBC BASIC supports drawing text, graphics, images etc. to the 'mainwin' and, by means of the MULTIWIN library, to one or more separate windows. The code listed below demonstrates how to create a custom graphics control to which such output can also be drawn. This allows you to display animated graphics etc. in a dialogue box.\\ \\  This example opens a dialogue box containing four graphicboxes, which are independently updated. Note that version 2.1 or later of the MULTIWIN library is required.\\  //by Richard Russell, August 2014//\\ \\  BBC BASIC supports drawing text, graphics, images etc. to the 'mainwin' and, by means of the MULTIWIN library, to one or more separate windows. The code listed below demonstrates how to create a custom graphics control to which such output can also be drawn. This allows you to display animated graphics etc. in a dialogue box.\\ \\  This example opens a dialogue box containing four graphicboxes, which are independently updated. Note that version 2.1 or later of the MULTIWIN library is required.\\ 
 +<code bb4w>
         INSTALL @lib$+"WINLIB2"         INSTALL @lib$+"WINLIB2"
         INSTALL @lib$+"MULTIWIN"         INSTALL @lib$+"MULTIWIN"
Line 76: Line 77:
         PROC_closedialog(dlg%)         PROC_closedialog(dlg%)
         END         END
 +</code>
 The parameters passed to FN_initctrl are the **dialogue box pointer** (as returned from FN_newdialog), the **ID number** assigned to the control (as specified in the call to PROC_dlgctrl) and the **window number** (between 1 and the number specified in the call to PROC_multiwin, in this case 4). The parameters passed to FN_initctrl are the **dialogue box pointer** (as returned from FN_newdialog), the **ID number** assigned to the control (as specified in the call to PROC_dlgctrl) and the **window number** (between 1 and the number specified in the call to PROC_multiwin, in this case 4).
creating_20a_20custom_20graphics_20control.1522502352.txt.gz · Last modified: 2024/01/05 00:18 (external edit)