Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
EM_SETTARGETDEVICE
Collapse the table of content
Expand the table of content

EM_SETTARGETDEVICE message

Sets the target device and line width used for "what you see is what you get" (WYSIWYG) formatting in a rich edit control.

Parameters

wParam

HDC for the target device.

lParam

Line width to use for formatting.

Return value

The return value is zero if the operation fails, or nonzero if it succeeds.

Remarks

The HDC for the default printer can be obtained as follows.


PRINTDLG pd = { sizeof(pd) };
pd.Flags = PD_RETURNDC | PD_RETURNDEFAULT;
if (PrintDlg(&pd))
{
    HDC hdc = pd.hDC;
    ...
}

If lParam is zero, no line breaks are created.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Richedit.h

 

 

Community Additions

ADD
Show:
© 2015 Microsoft