summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
8067659)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32247
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
#include "wx/msw/missing.h"
#if defined(__WXWINCE__)
#include "wx/msw/missing.h"
#if defined(__WXWINCE__)
-#include "wx/msw/wince/missing.h"
+ #include "wx/msw/wince/missing.h"
+#if defined(TME_LEAVE) && defined(WM_MOUSELEAVE)
+ #define HAVE_TRACKMOUSEEVENT
+#endif // everything needed for TrackMouseEvent()
+
// ---------------------------------------------------------------------------
// global variables
// ---------------------------------------------------------------------------
// ---------------------------------------------------------------------------
// global variables
// ---------------------------------------------------------------------------
void wxWindowMSW::OnInternalIdle()
{
void wxWindowMSW::OnInternalIdle()
{
+#ifndef HAVE_TRACKMOUSEEVENT
// Check if we need to send a LEAVE event
if ( m_mouseInWindow )
{
// Check if we need to send a LEAVE event
if ( m_mouseInWindow )
{
GenerateMouseLeave();
}
}
GenerateMouseLeave();
}
}
+#endif // !HAVE_TRACKMOUSEEVENT
if (wxUpdateUIEvent::CanUpdate(this))
UpdateWindowUI(wxUPDATE_UI_FROMIDLE);
if (wxUpdateUIEvent::CanUpdate(this))
UpdateWindowUI(wxUPDATE_UI_FROMIDLE);
+#ifdef HAVE_TRACKMOUSEEVENT
+ // filter out excess WM_MOUSELEAVE events sent after PopupMenu() (on XP at least)
+ if ( m_mouseInWindow )
- // filter out excess WM_MOUSELEAVE events sent after PopupMenu() (on XP at least)
- if ( m_mouseInWindow )
- {
- GenerateMouseLeave();
- }
-
- // always pass processed back as false, this allows the window
- // manager to process the message too. This is needed to
- // ensure windows XP themes work properly as the mouse moves
- // over widgets like buttons.
- processed = false;
+
+ // always pass processed back as false, this allows the window
+ // manager to process the message too. This is needed to
+ // ensure windows XP themes work properly as the mouse moves
+ // over widgets like buttons. So don't set processed to true here.
+#endif // HAVE_TRACKMOUSEEVENT
#if wxUSE_MOUSEWHEEL
case WM_MOUSEWHEEL:
#if wxUSE_MOUSEWHEEL
case WM_MOUSEWHEEL:
{
// Generate an ENTER event
m_mouseInWindow = true;
{
// Generate an ENTER event
m_mouseInWindow = true;
-#ifndef __WXWINCE__
- TRACKMOUSEEVENT trackinfo;
- trackinfo.cbSize = sizeof(trackinfo);
+#ifdef HAVE_TRACKMOUSEEVENT
+ WinStruct<TRACKMOUSEEVENT> trackinfo;
+
trackinfo.dwFlags = TME_LEAVE;
trackinfo.hwndTrack = GetHwnd();
trackinfo.dwFlags = TME_LEAVE;
trackinfo.hwndTrack = GetHwnd();
- //Use the commctrl.h _TrackMouseEvent, which will call the
- // appropriate TrackMouseEvent or emulate it ( win95 )
- // else we need _WIN32_WINNT >= 0x0400
+
+ // Use the commctrl.h _TrackMouseEvent(), which will call the real
+ // TrackMouseEvent() if available or emulate it
_TrackMouseEvent(&trackinfo);
_TrackMouseEvent(&trackinfo);
+#endif // HAVE_TRACKMOUSEEVENT
+
wxMouseEvent event(wxEVT_ENTER_WINDOW);
InitMouseEvent(event, x, y, flags);
wxMouseEvent event(wxEVT_ENTER_WINDOW);
InitMouseEvent(event, x, y, flags);