From c17cc4a96f7631c99e019a963c5faa664dd30405 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 9 May 2000 21:18:19 +0000 Subject: [PATCH] owner drawn buttons change appearance when double clicked git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7372 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/button.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/msw/button.cpp b/src/msw/button.cpp index 904e3998f5..d58fda1ac6 100644 --- a/src/msw/button.cpp +++ b/src/msw/button.cpp @@ -280,16 +280,14 @@ long wxButton::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam) // let the default processign take place too } - // VZ: I don't remember any more why was this needed but everything seems - // to work just fine without this code and it prevents LDCLICK events - // from being generated, so I will probably remoe it completely soon -#if 0 else if ( nMsg == WM_LBUTTONDBLCLK ) { - // trick the base class into thinking that this was just a click - nMsg = WM_LBUTTONDOWN; + // emulate a click event to force an owner-drawn button to change its + // appearance - without this, it won't do it + (void)wxControl::MSWWindowProc(WM_LBUTTONDOWN, wParam, lParam); + + // and conitnue with processing the message normally as well } -#endif // 0 // let the base class do all real processing return wxControl::MSWWindowProc(nMsg, wParam, lParam);