ADC Home > Reference Library > Technical Q&As > Legacy Documents > Carbon >

Legacy Documentclose button

Important: This document is part of the Legacy section of the ADC Reference Library. This information should not be used for new development.

Current information on this Reference Library topic can be found here:

HMShowBalloon styled TEHandle limit and Workaround

Q Sometimes balloons won't show up when I call HMShowBalloon; I get a paramErr (-50) instead. The hmHelpType is khmmTEHandle. The HMShowBalloon function calls TextWidth on the hText of my TEHandle (the result of which is 1511 (338 chars)), then multiplies that by the lineHeight (12), yielding 18132. It then compares this to 17000, doesn't like the result, puts -50 into a register and backs out of everything it has done previously. What is the Help Manager doing?

A The Help Manager checks against 17000 to ensure that the help balloon window is always smaller than the Macintosh system screen. However, the value used (17000) should be a much larger value. As it is right now in System 7, you're limited to about the same number of characters with a styled TEHandle as you are with a Pascal string: 255 characters.

To avoid this limitation, use clear concise phrases to make your help system as short as possible. If you've already done that and your help message still isn't short enough, you can use khmmPict or khmmPictHandle and use a picture for your help message. Using a picture has a disadvantage in the fact that pictures use a little more memory for the same help message and you'll have to add carriage returns for the line breaks yourself where you need them. You can use MacDraw or a similar program to create the pictures.

[May 01 1995]


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.