The information in this article applies to:
SYMPTOMSIf you create an ActiveX control that subclasses a button, you may find that the control doesn't fire a "click" event. You can observe this behavior by running the BUTTON sample included with Visual C++ 4.2. CAUSEThere is a bug in the COleControl::OnLButtonUp() function. CWnd::OnLButtonUp() should be called within the function before calling COleControl::ButtonUp(). RESOLUTIONYou can work around the problem by trapping the WM_LBUTTONUP message in your control. Copy the code from the OnLButtonUp() function located in \MSDEV\MFC\SRC\CTLEVENT.CPP and place it into your new handler. Move the call to CWnd::OnLButtonUp() before the call to ButtonUp() so that the new function looks like the following:
STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This bug was corrected in Visual C++ version 4.2b. REFERENCESFor more information about Visual C++ 4.2b, please see the following article in the Microsoft Knowledge Base: Q156934 PATCH: Visual C++ 4.2b Patch Additional query words: 4.20 kbdsd FIXLIST4.20b
Keywords : kbVC kbBug kbfix |
Last Reviewed: July 29, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |