Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!asuvax!ncar!boulder!piper!bernard From: bernard@piper.colorado.edu (Bernie Bernstein) Newsgroups: comp.sys.mac.programmer Subject: Think C 4.0 CStaticText problem Message-ID: <17678@boulder.Colorado.EDU> Date: 2 Mar 90 22:43:06 GMT Sender: news@boulder.Colorado.EDU Reply-To: bernard@piper.colorado.edu (Bernie Bernstein) Organization: University of Colorado, Boulder Lines: 29 In the AdjustBounds() definition in CStatic Text, the right bounds is adjusted to one greater than the actual calculation. This makes room for an extra character in the bounds. Why is this done was it a mistake or is this +1 there for a reason? I prefer to adjust for the extra size myself. void CStaticText::AdjustBounds() { ... if (lineWidth > 0) { bounds.right = lineWidth; } else { bounds.right = t->viewRect.right - t->viewRect.left; } bounds.right = bounds.right / hScale + 1; ^^^ ... } I removed this in my copy of it, but I just want to know if there is any reason to put it back in. o, ,, , | Bernie Bernstein | , ,, L>O/ \,/ \ ,| University of Colorado at boulder |/ \,,/ \ O./ ' / . `, / | office: (303) 492-8136 | / ` \ ,. ,/ / , ' | email: bernard@boulder.colorado.edu | / '' \