Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

FORMATRANGE structure

Information that a rich edit control uses to format its output for a particular device. This structure is used with the EM_FORMATRANGE message.

Syntax


typedef struct _formatrange {
  HDC       hdc;
  HDC       hdcTarget;
  RECT      rc;
  RECT      rcPage;
  CHARRANGE chrg;
} FORMATRANGE;

Members

hdc

Type: HDC

A HDC for the device to render to, if EM_FORMATRANGE is being used to send the output to a device.

hdcTarget

Type: HDC

An HDC for the target device to format for.

rc

Type: RECT

The area within the rcPage rectangle to render to. Units are measured in twips.

rcPage

Type: RECT

The entire area of a page on the rendering device. Units are measured in twips.

chrg

Type: CHARRANGE

The range of characters to format.

Remarks

hdcTarget contains the HDC to format for, which is usually the same as the HDC specified by hdc but can be different. For example, if you create a print preview module, hdc is the HDC of the window in which the output is viewed, and hdcTarget is the HDC for the printer.

The values for rc and rcPage can be obtained by using GetDeviceCaps.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Richedit.h

See also

EM_FORMATRANGE

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.