Using WaitCtrl contents: test.c: sample C source code for an NDA utilizing WaitCtrl test.h: defines used in test.c and test.rez test.rez: rez definition for the NDA controls and window waitctrl: the actual control, assembled and linked waitctrl.asm: source code for the control waitctrl.mac: macros for the control waitctrl.txt: this file. WaitCtrl draws a "barbershop" style thermometer, usually used to indicate an event is happening, but you don't know how long it will take. It's easiest to 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 $00700000 read 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 or SetCtlValueByID with an increasing (or decreasing) number. The control may 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 thermometer and 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 volume 9103 (available on TIAB and syndicomm's ftp archive) and SC04.CustCtrl (from Apple's Source Code disk). Kelvin W Sherlock kws@syndicomm.com 8/22/2004