描述
The PARAFORMAT structure contains information about paragraph formatting attributes in a rich edit control. This structure is used with the EM_GETPARAFORMAT and EM_SETPARAFORMAT messages.
In Microsoft Rich Edit 2.0, the PARAFORMAT2 structure is a Rich Edit 2.0 extension of the PARAFORMAT structure. Rich Edit 2.0 allows you to use either structure with EM_GETPARAFORMAT and EM_SETPARAFORMAT.
C/C++ 语法
typedef struct _paraformat { UINT cbSize; DWORD dwMask; WORD wNumbering; WORD wReserved; LONG dxStartIndent; LONG dxRightIndent; LONG dxOffset; WORD wAlignment; SHORT cTabCount; LONG rgxTabs[MAX_TAB_STOPS]; } PARAFORMAT; |
FreeBasic Syntax
TYPE PARAFORMAT cbSize AS UINT dwMask AS DWORD wNumbering AS WORD wEffects AS WORD dxStartIndent AS LONG dxRightIndent AS LONG dxOffset AS LONG wAlignment AS WORD cTabCount AS SHORT rgxTabs(0 TO 31) AS LONG END TYPE |
成员
cbSize
Structure size, in bytes. The member must be filled before passing to the rich edit control.
dwMask
Members containing valid information or attributes to set. This parameter can be none or a combination of the following values. If both PFM_STARTINDENT and PFM_OFFSETINDENT are specified, PFM_STARTINDENT takes precedence.
PFM_ALIGNMENT
The wAlignment member is valid.
PFM_NUMBERING
The wNumbering member is valid.
PFM_OFFSET
The dxOffset member is valid.
PFM_OFFSETINDENT
The dxStartIndent member is valid and specifies a relative value.
PFM_RIGHTINDENT
The dxRightIndent member is valid.
PFM_RTLPARA
Rich Edit 2.0: The wEffects member is valid
PFM_STARTINDENT
The dxStartIndent member is valid.
PFM_TABSTOPS
The cTabStobs and rgxTabStops members are valid.
wNumbering
Value specifying numbering options. This member can be zero or PFN_BULLET.
wReserved
Rich Edit 1.0:: This member is named wReserved. Reserved; the value must be zero.
Rich Edit 2.0: This member is named wEffects. A bit flag that specifies a paragraph effect. It is included only for compatibility with Text Object Model (TOM) interfaces; the rich edit control stores the value but does not use it to display the text. This parameter can be one of the following values.
0
Displays text using left-to-right reading order. This is the default.
PFE_RLTPARA
Displays text using right-to-left reading order.
dxStartIndent
Indentation of the first line in the paragraph, in twips. If the paragraph formatting is being set and PFM_OFFSETINDENT is specified, this member is treated as a relative value that is added to the starting indentation of each affected paragraph.
dxRightIndent
Size, of the right indentation relative to the right margin, in twips.
dxOffset
Indentation of the second and subsequent lines of a paragraph relative to the starting indentation, in twips. The first line is indented if this member is negative or outdented if this member is positive.
wAlignment
Value specifying the paragraph alignment. This member can be one of the following values.
PFA_CENTER
Paragraphs are centered.
PFA_LEFT
Paragraphs are aligned with the left margin.
PFA_RIGHT
Paragraphs are aligned with the right margin.
cTabCount
Number of tab stops.
rgxTabs
Array of absolute tab stop positions.
最低操作系统
Windows 95, Windows NT 4.0.