Using ANSI C (Part 4)
by Lee Calcraft

This is an example of a Wimp application written in C. When run, the program adds an icon to the icon bar. Clicking Select on this icon causes a beep to be generated. Clicking Menu over the icon displays a menu containing the usual Info and Quit options, plus a Test option.

The Test option leads to a submenu containing three entries. Choosing Test1 causes a tick to be toggled on and off. Choosing Test2 has no effect. The third entry, Search, leads to a dialogue box containing a writeable icon, an option (on/off) icon entitled 'Case sens' and an action icon entitled 'OK'.

As with all dialogue boxes created using the dbox library, the function keys activate icons in order, so pressing F1 activates the 'OK' icon, while F2 toggles the 'Case sens' icon on and off. Also pressing Return while the caret is in the last writeable icon (in this case the only one), activates icon 0, ie the 'OK' icon.

The application's source code is saved as !C_Demo.C_Source.
