Export (0) Print
Expand All
Expand Minimize

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 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Richedit.h

 

 

Community Additions

ADD
Show:
© 2014 Microsoft