GXComputeLineBreaks

int GXComputeLineBreaks(CDC* pDC, LPCTSTR sz, int nCount, LPRECT rc, UINT nFormat, int* LineBreaks, int* LineLengths, int nMaxBreaks);

pDC

Points to the device context.

sz

Points to the text to be drawn.

nCount

Specifies the size of the text in bytes. You should pass -1 for a zero-terminated string.

rc

Drawing rectangle.

nFormat

  • Format:

  • DT_LEFTleft aligned

  • DT_CENTERcentered

  • DT_RIGHTright aligned

  • DT_TOPtop aligned

  • DT_VCENTERvertically centered

  • DT_BOTTOMbottom aligned

DT_WORBREAKword break

LineBreaks

Pointer to an integer where the number of necessary line breaks will be returned. Must not be NULL.

LineLengths

Pointer to an array of integers where the line break positions will be returned.

nMaxBreaks

The size of the integer array.

Return Value

The number of line breaks.

Remarks

This method computes the line break positions for a given text so that it can draw into a given rectangle. GXDrawTextLikeMultiLineEdit calls this method to find out where to break the lines.

See Also

 CGXDrawingAndFormatting  GXDrawTextLikeMultiLineEdit

Macros

 Class Overview |  Class Members