Article ID: 245754 - Last Review: February 28, 2007 - Revision: 3.2

BUG: Windows 2000 RichEdit Control Generates WM_CONTEXTMENU Message

This article was previously published under Q245754
Expand all | Collapse all

SYMPTOMS

On Windows 2000, version 1.0 of the RichEdit control (Riched32.dll) causes a WM_CONTEXTMENU message to be generated when the user right-clicks in the control. The same version of the RichEdit control on Microsoft Windows 95, Microsoft Windows 98, and Microsoft Windows NT 4.0 does not cause the WM_CONTEXTMENU message to be generated.

CAUSE

The earlier version of the control does not pass the WM_RBUTTONUP and WM_RBUTTONDOWN messages to the DefWindowProc function. On Windows 2000, the RichEdit control forwards the WM_RBUTTONUP and WM_RBUTTONDOWN messages to DefWindowProc. DefWindowProc creates the WM_CONTEXTMENU message.

RESOLUTION

There is no way to prevent the WM_CONTEXTMENU message from being generated. You must make sure that your application can handle the WM_CONTEXTMENU message without problems if this message is not expected.

STATUS

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

APPLIES TO
  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Advanced Server
  • Microsoft Windows 2000 Professional Edition
Keywords: 
kbbug kbctrl kbnofix kbrichedit KB245754
 

Article Translations