Utility TEXTRECT (OpenInsight 32-Bit)
At 19 JUL 2010 10:22:22PM Colin Rule wrote:
The online help indicates usage of DT_WORDBREAK (enumerates to 16).
I have tried calling this but I do not get any returned word breaks in the text.
Is this function supposed to return the modified text with CRLF, or is there some other trick.
Code is below:
DECLARE FUNCTION UTILITYequ DT_WORDBREAK$ to 16FONT=GET_PROPERTY("ICEPAC_MENU.BQ_TABLE","FONT")WRAP_WIDTH=20TEXTINFO="TEXTINFO=Cost of completing duties of Project Supervisor (Construction Stage) in accordance with the Safety, Health & Welfare at Work (Construction) Regulations, 2001 and Clause 3.1.14 of this Specification."TEXTINFO=DT_WORDBREAK$TEXTINFO=WRAP_WIDTHTEXTINFO=FONTRESULT=Utility("TEXTRECT","",TEXTINFO)SWAP CHAR(13):CHAR(10) WITH @VM IN TEXTINFODEBUG
return 1
At 20 JUL 2010 04:22AM [url=http://www.sprezzatura.com]The Sprezzatura Group[/url] wrote:
Colin,
TEXTRECT only returns the size of the rectangle needed to draw the text - it does not alter the text in any way. It is basically a thin wrapper around the Windows API DrawText() function so you can calculate the size of the area needed to render the text into.
World leaders in all things RevSoft
At 20 JUL 2010 08:12PM Colin Rule wrote:
Please can you then advise what fields and are for in the TEXTRECT service, the documentationstates:
Refer to SDK DrawText() (Format parameter)
Width of rectangle for DT_WORDBREAK flag set (only if object doesn't exist)
Thanks
Colin
At 20 JUL 2010 08:15PM Colin Rule wrote:
Oh, I have also tried setting up DrawText as a DLL declaration in User32.DLL.
The RECT parameter seems to be a problem.
Any suggestions as what the declarations might be.
MSDN states:
int DrawText(
__in HDC hDC,__inout LPCTSTR lpchText,__in int nCount,__inout LPRECT lpRect,__in UINT uFormat);