Using WaitCtrlcontents:test.c: sample C source code for an NDA utilizing WaitCtrltest.h: defines used in test.c and test.reztest.rez: rez definition for the NDA controls and windowwaitctrl: the actual control, assembled and linkedwaitctrl.asm: source code for the controlwaitctrl.mac: macros for the controlwaitctrl.txt: this file.WaitCtrl draws a "barbershop" style thermometer, usually used to indicatean event is happening, but you don't know how long it will take. It's easiestto use it as a resource, though you'll need to modify your Types.rez file:just before the end of the/*------------------------ rControlTemplate ---------------*/type rControlTemplate {block, add this: /* kws -- custom stuff */ case WaitControl: key longint = 0x00700000; /* procRef */ optional Fields { _mybase_ integer; /* flags */ _mybase_ integer; /* more flags */ _mybase_ longint; /* refcon */ };in your rez file, do something like this:#define WaitCodeRID 0x00700000// include the control code, ID $00700000read rCtlDefProc (WaitCodeRID, fixed, convert) "waitctrl";resource rControlTemplate(CtrlWait) { CtrlWait, // ID { 2, 4, 10, 202 }, // rectangle WaitControl { { ctlVisible, /* flags */ fCtlProcNotPtr, /* More Flags */ 0x0 } }};Using is simple: Set a counter of some sort and call SetCtlValue orSetCtlValueByID with an increasing (or decreasing) number. The controlmay be hidden or inactivated. fCtlTie is currently ignored.Future enhancements (maybe).- support for fCtlTie flag- support for custom color table (currently red/white scheme only)- multi-use (ie, a flag so it can switch between a regular thermometerand a wait control).WaitCtrl is released as copyrighted Freeware (new-style BSD license).If you're interested in modifying it, please take a look at 8-16 volume9103 (available on TIAB and syndicomm's ftp archive) and SC04.CustCtrl(from Apple's Source Code disk).Kelvin W Sherlockkws@syndicomm.com8/22/2004