![]() |
Touch-It Virtual Keyboard | Version 4.9.2 |
| Windows messages |
|
Windows message WM_TOUCHITLIGHT parameters are:
Interface
When starting, Touch-It broadcasts a WM_TOUCHITSTART message which allows you to initialize the lights state.
See Windows messages to learn how to trap this message.
var
WM_TOUCHITLIGHT :integer;//Variable for unique Windows message ID implementation //************************************************************************************ //The vumeter is driven by the TrackBar1. All lights under a certain value must be ON. procedure TForm1.TrackBar1Change(Sender: TObject); var i :integer;//Loop count const
FirstLed = 2000;//First light code and number of lights for i := 0 to LedCount -1 do PostMessage(FindWindow(nil, PChar('Touch-It Keyboard')), WM_TOUCHITLIGHT, FirstLed +i, integer(TrackBar1.Position > i)); end;//************************************************************************************ //The post-process is driven by the TrackBar2. Only one light is ON at a time. procedure TForm1.TrackBar1Change(Sender: TObject); var i :integer;//Loop count const
FirstLed = 2100;//First light code and number of lights for i := 0 to LedCount -1 do PostMessage(FindWindow(nil, PChar('Touch-It Keyboard')), WM_TOUCHITLIGHT, FirstLed +i, integer(TrackBar2.Position = i+1)); end;//************************************************************************************ //Warnings lights are driven by the CheckBoxes. Flashing is managed in the Timer OnTimer event. //Change warning states when CheckBoxes are clicked. The Tag property contains the light code. procedure TForm1.cbPressureClick(Sender: TObject); begin with TCheckBox(Sender) do Warnings[Tag] := Checked; end;//Switch ON or OFF procedure TForm1.Timer1OnTimer(Sender: TObject); var i :integer;//Loop count begin
for i := low(Warnings) to high(Warnings) do PostMessage(FindWindow(nil, PChar('Touch-It Keyboard')), WM_TOUCHITLIGHT, i, integer(Warnings[i] and FlipFlop)); FlipFlop := not FlipFlop; end;//Retreive the unique Windows message ID initialization WM_TOUCHITSHOWHIDE := RegisterWindowMessage('TOUCHITLIGHT'); |
| Copyright © 2011 Chessware SA |