PRB: New Behavior of Multiline CJK Rich Edit Controls Under Windows 2000 (255858)



The information in this article applies to:

  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Advanced Server
  • Microsoft Windows 2000 Professional

This article was previously published under Q255858

SYMPTOMS

The display of multiline text in rich edit controls may be truncated when Chinese, Japanese, or Korean fonts are used.

CAUSE

There has been a change in the behavior of rich edit controls under Windows 2000 when Chinese, Japanese, or Korean fonts are used. In earlier versions, there is no spacing between lines. With the intention of increasing readability, lines are now spaced slightly apart. This can truncate displays if the computation of the rectangle for the control does not take this change into account.

RESOLUTION

The behavior in earlier versions can be recovered; the following code fragment suggests a method:
	PARAFORMAT2 pf;
	ZeroMemory((void*)&pf, sizeof(pf));
	pf.cbSize = sizeof(pf);
	pf.dwMask = PFM_LINESPACING;
	pf.dyLineSpacing=lfWeight;
	pf.bLineSpacingRule = 4;
	::SendMessage(m_field.m_hWnd, EM_SETPARAFORMAT, 0, (LPARAM)&pf);
				

STATUS

This behavior is by design.

Modification Type:MajorLast Reviewed:11/20/2003
Keywords:kbBug kbLocalization kbprb kbVC500fix kbVC600fix KB255858