描述
The FORMATRANGE structure contains information that a rich edit control uses to format its output for a particular device. This structure is used with the EM_FORMATRANGE message.
C/C++ 语法
typedef struct _formatrange { HDC hdc; HDC hdcTarget; RECT rc; RECT rcPage; CHARRANGE chrg; } FORMATRANGE; |
FreeBasic Syntax
TYPE FORMATRANGE hdc AS HDC hdcTarget AS HDC rc AS RECT rcPage AS RECT chrg AS CHARRANGE END TYPE |
成员
hdc
A handle to a device context (HDC) for the device to render to, if EM_FORMATRANGE is being used to send the output to a device.
hdcTarget
An HDC for the target device to format for.
rc
The area to render to. Units are measured in twips.
rcPage
The entire area of a page on the rendering device. Units are measured in twips.
chrg
A CHARRANGE structure that specifies the range of characters to format.
备注
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.
最低操作系统
Windows 95, Windows NT 4.0.