Using ANSI C (Part 8)
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. The Save option leads to a standard save box (see below). The third entry, Search, leads to a dialogue box containing a writable icon, an option (on/off) icon entitled 'Case sens', an action icon entitled 'OK', an icon entitled 'Previous' and 3 radio icons 'Opt-1', 'Opt-2' and 'Opt-3'.

This month, the Save entry in the Test submenu is the same as last month. It leads to a standard save box containing a text icon. This can be saved by dragging the icon to a directory, or by typing a full pathname into the writable icon. The text file saved contains the text "just a piece of text". The difference this month is that the save is done via RAM transfer if possible (where appropriate).

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