SECEditViewport::RenderBlockText

CSize SECEditViewport::RenderBlockText(CDC* pDC, int nTabStops, int nX, int nY, int nLeftEgdeOffset, LPCTSTR lpszText, int nLength, int nCol, int nLineNo, SECEditColorInfo* pFontInfo, BOOL bInSelection)

Renders a block of text to the screen

Defined in: SECEditViewport.cpp

Return Value

A CSize containing the size of the text rendered

Parameters

pDC

The DC on which to render this block of text

nTabStops

The tab size in device units

nX

The x coordinate of this block of text in logical units

nY

The y coordinate of this this block of text in device units

nLeftEgdeOffset

The distance in device units between 0 and the start of this line

lpszText

Pointer to the text for this block. May not be NULL terminated

nLength

The length of the text of this block, in TCHARs

nCol

The column in the given line that the block starts with

nLineNo

The line pf text in which this block is contained

pFontInfo

Pointer to the font information for this block.

bInSelection

Indicates if any part of this block is contained in a selection

Comments

This function actually renders the text to the DC. The DC is already set up when this function is called, its purpose is to give the user a chance to hook into and customize the actual rendering of the text.

By default, this function merely calls TabbedTextOut. When this function is called, the DC is already set up with the correct Font, TextColor and BKColor. If you change the font, you should select the original font back into the DC before returning, but you may change the BkColor and TextColor without restoring these.

See Also

SECEditViewport DrawBlock