I would like to know how long a string would be if it were displayed in a richedit control - not how many characters, but physical width.
I'm trying to create a text string of length X, rather than measure a string that already exists in the control. Font selection needs to be taken into account.
I can get text physical size using XPrint and Graphic commands, but I'm not finding an equivalent one for a richedit control. I can attach a printer and use XPrint commands, or create a hidden graphic control and attach to it. Their length information can applied to text in a richedit control, but I wanted to avoid both alternatives - just use code specific to a richedit control (or any generic control that displays text).
For my purposes, the text would be on a single line (no multi-line issues).
I'm trying to create a text string of length X, rather than measure a string that already exists in the control. Font selection needs to be taken into account.
I can get text physical size using XPrint and Graphic commands, but I'm not finding an equivalent one for a richedit control. I can attach a printer and use XPrint commands, or create a hidden graphic control and attach to it. Their length information can applied to text in a richedit control, but I wanted to avoid both alternatives - just use code specific to a richedit control (or any generic control that displays text).
For my purposes, the text would be on a single line (no multi-line issues).
Comment