IStatic size | developer.brewmp.com IStatic size | developer.brewmp.com

Developer

IStatic size

Forums:

I have this text that I want to display in a IStatic control but there's some weirdness where the text is cutoff at the end. Also the middle portion of the text is missing. Any ideas why this is happening? I use ISTATIC_SetRect() to set the size prior to displaying the text. The y dimension is set to device info cyScreen.

Can I set the y size to be bigger than the device size?

Thanks.

If you're using ISHELL_LoadResString or STR_TO_WSTR, make sure the buffer is big enough to hold the text and the nSize parameter is correct.
Verify the string is complete by printing it out w/DBGPRINTF before the ISTATIC_SetText.

If you're using ISHELL_LoadResString or STR_TO_WSTR, make sure the buffer is big enough to hold the text and the nSize parameter is correct.
Verify the string is complete by printing it out w/DBGPRINTF before the ISTATIC_SetText.

The ISTATIC control has a limit of 256 bytes ( I think ... ). Maybe it's your problem.

The ISTATIC control has a limit of 256 bytes ( I think ... ). Maybe it's your problem.

ISTATIC_SetRect(...) set a rectangle in pixels. It includes the TITLE space (you can't avoid it).
Maybe in your calculation you forgot the TITLE height?
Anyway... once you set the area (again: in pixels) you will _SetText(...). BREW calculates the number of chars per line based on Font Metrics and it will word wrap your text as necessary. It also calculates the number of lines that will fit on the RectArea and if necessary it will display a scroll bar at the right side of the text (unless you set NO_SCROLL on properties...).
[]'s

ISTATIC_SetRect(...) set a rectangle in pixels. It includes the TITLE space (you can't avoid it).
Maybe in your calculation you forgot the TITLE height?
Anyway... once you set the area (again: in pixels) you will _SetText(...). BREW calculates the number of chars per line based on Font Metrics and it will word wrap your text as necessary. It also calculates the number of lines that will fit on the RectArea and if necessary it will display a scroll bar at the right side of the text (unless you set NO_SCROLL on properties...).
[]'s

I'm haven't run into any limit on the number of characters you can have in an ISTATIC control. My help system uses ISTATIC's to display text, and some of them have around 1,000 characters.

I'm haven't run into any limit on the number of characters you can have in an ISTATIC control. My help system uses ISTATIC's to display text, and some of them have around 1,000 characters.