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 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;
  WORD  wReserved;
  LONG  dxStartIndent;
  LONG  dxRightIndent;
  LONG  dxOffset;
  WORD  wAlignment;
  SHORT cTabCount;
  LONG  rgxTabs;
} 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.

ValueMeaning
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

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.

ValueMeaning
0

Displays text using left-to-right reading order. This is the default.

PFE_RLTPARA

Displays text using right-to-left reading order.

 

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.

ValueMeaning
PFA_CENTER

Paragraphs are centered.

PFA_LEFT

Paragraphs are aligned with the left margin.

PFA_RIGHT

Paragraphs are aligned with the right margin.

 

cTabCount

Type: SHORT

Number of tab stops.

rgxTabs

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.

ValueMeaning
0

Ordinary tab

1

Center tab

2

Right-aligned tab

3

Decimal tab

4

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.

ValueMeaning
0

No leader

1

Dotted leader

2

Dashed leader

3

Underlined leader

4

Thick line leader

5

Double line leader

 

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Richedit.h

See also

Reference
EM_GETPARAFORMAT
EM_SETPARAFORMAT
PARAFORMAT2

 

 

Community Additions

ADD
Show:
© 2014 Microsoft