PARAFORMAT structure (richedit.h)
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 Microsoft Rich Edit 2.0 extension of the PARAFORMAT structure. Microsoft Rich Edit 2.0 allows you to use either structure with EM_GETPARAFORMAT and EM_SETPARAFORMAT.
Syntax
typedef struct _paraformat {
UINT cbSize;
DWORD dwMask;
WORD wNumbering;
union {
WORD wReserved;
WORD wEffects;
};
LONG dxStartIndent;
LONG dxRightIndent;
LONG dxOffset;
WORD wAlignment;
SHORT cTabCount;
LONG rgxTabs[MAX_TAB_STOPS];
} PARAFORMAT;
Members
cbSize
Type: UINT
Structure size, in bytes. The member must be filled before passing to the rich edit control.
dwMask
Type: DWORD
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.
wNumbering
Type: WORD
Value specifying numbering options. This member can be zero or PFN_BULLET.
wReserved
Type: WORD
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 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.
Value | Meaning |
---|---|
|
Displays text using left-to-right reading order. This is the default. |
|
Displays text using right-to-left reading order. |
wEffects
dxStartIndent
Type: LONG
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
Type: LONG
Size, of the right indentation relative to the right margin, in twips.
dxOffset
Type: LONG
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
Type: WORD
Value specifying the paragraph alignment. This member can be one of the following values.
Value | Meaning |
---|---|
|
Paragraphs are centered. |
|
Paragraphs are aligned with the left margin. |
|
Paragraphs are aligned with the right margin. |
cTabCount
Type: SHORT
Number of tab stops.
rgxTabs[MAX_TAB_STOPS]
Type: LONG
Array of absolute tab stop positions. Each element in the array specifies information about a tab stop. The 24 low-order bits specify the absolute offset, in twips. To use this member, set the PFM_TABSTOPS flag in the dwMask member.
Rich Edit 2.0: For compatibility with TOM interfaces, you can use the eight high-order bits to store additional information about each tab stop.
Bits 24-27 can specify one of the following values to indicate the tab alignment. These bits do not affect the rich edit control display for versions earlier than Microsoft Rich Edit 3.0.
Value | Meaning |
---|---|
|
Ordinary tab |
|
Center tab |
|
Right-aligned tab |
|
Decimal tab |
|
Word bar tab (vertical bar) |
Bits 28-31 can specify one of the following values to indicate the type of tab leader. These bits do not affect the rich edit control display.
Value | Meaning |
---|---|
|
No leader |
|
Dotted leader |
|
Dashed leader |
|
Underlined leader |
|
Thick line leader |
|
Double line leader |
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Header | richedit.h |
See also
Reference