Microsoft KB Archive/240886

{|
 * width="100%"|

BUG: Disabled RTF Displays Wrong Color

 * }

Q240886

-

The information in this article applies to:


 * Microsoft Win32 Software Development Kit (SDK)
 * Microsoft Windows 2000 Advanced Server
 * Microsoft Windows 2000 Server
 * Microsoft Windows 2000 Professional

-

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 this to be a bug in the Microsoft products listed at the beginning of this article.

Additional query words:

Keywords : kbOSWin2000 kbOSWin2000bug kbRichEdit _IK

Issue type : kbbug

Technology : kbwin2000AdvServ kbwin2000AdvServSearch kbwin2000Serv kbwin2000ServSearch kbwin2000Search kbwin2000ProSearch kbwin2000Pro kbWin32SDKSearch kbAudDeveloper kbSDKSearch kbWinAdvServSearch kbWin32sSearch