Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!decwrl!ads.com!potomac.ads.com!jtn From: jtn@potomac.ads.com (John T. Nelson) Newsgroups: comp.sys.mac.programmer Subject: Re: Looking for a thermometer (C source code)... Message-ID: <1991Jun25.221033.9507@potomac.ads.com> Date: 25 Jun 91 22:10:33 GMT References: <1991Jun25.185302.5653@potomac.ads.com> Organization: Advanced Decision Systems, Arlington, VA Lines: 27 In article <1991Jun25.185302.5653@potomac.ads.com> jtn@potomac.ads.com (John T. Nelson) writes: > >Yes it's ME again! I'm looking for source code (compatible with >Lightspeed C preferabley) that will display a "progress indicator" or >"thermometer" as they are sometimes called. You know... like the >progress indicator you get when copying files. Well how to do it? > >And please... no useless zebra striped guages :-) And now I'm going to respond to my own posting. The thermometer problem is TRIVIAL with a capital T. Basically all you need to do is define a Rect someplace (like in a resource), get the size of the rect and modify rect.right as follows: rect.right = rect.right * count / totalCount; As count counts towards totalCount it sets the right side of the rect to be larger and larger. Then you just do PaintRect(&rect). Don't forget to do PenPat(gray) before doing the PaintRect. Its a quick half-hour hack. --- John T. Nelson Internet: jtn@potomac.ads.com Advanced Decision Systems Uucp: kzin!speaker@mimsy.umd.edu Arlington, VA (703) 243-1611