BUG: Disabled RTF Displays Wrong Color (240886)



The information in this article applies to:

  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Advanced Server
  • Microsoft Windows 2000 Professional
  • Microsoft Platform Software Development Kit (SDK) 1.0

This article was previously published under Q240886

SYMPTOMS

When a Rich Text Format (RTF) control is disabled, by using EnableWindow(hwnd,FALSE), although the control's background color is set to a color other than the default (by using EM_SETBKGNDCOLOR), the default background color of the control is displayed.

CAUSE

This is caused by a bug in the EnableWindow API function.

RESOLUTION

There are two ways to work around this problem:
  1. Use SetWindowLong to add the WS_DISABLED style.
  2. Use an EM_SETREADONLY or EM_SETOPTIONS message.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

Modification Type:MinorLast Reviewed:7/11/2005
Keywords:kbBug kbRichEdit KB240886