4.1.1.4.5 Accessing a Static and Slider Controls with Origin C

The Slider example demonstrates how to access a static (text label) and slider controls in a Dialog Builder resource. To access the static control in the Set Volume dialog below the example program uses the Origin C Control class. To access the slider controls in the Set Volume dialog below the example program uses the Origin C Slider class. The example dialog is launched by executing the function SetVolume in the source file Slider.c found in this zip file, under the \Dialog Builder\Slider subfolder of Origin.

Accessing a Static and Slider Controls with Origin C image144.gif

To launch the Set Volume dialog above:

  1. Open the source file Slider.c in Code Builder.
  2. Add Slider.c to the Code Builder workspace by activating it and pressing the CTRL + W keys.
  3. Build Slider.c by clicking the Build button Accessing a Static and Slider Controls with Origin C image12.gif.
  4. Type SetVolume() in the Script Window or LabTalk Console and press the ENTER key.