DWORD msflags = WS_VISIBLE | MSWGetCreateWindowFlags(&exstyle);
#ifdef __WXUNIVERSAL__
- // no 3d effects, we draw them ourselves
- exStyle = 0;
+ // no borders, we draw them ourselves
+ exstyle = 0;
+ msflags &= ~WS_BORDER;
#endif // wxUniversal
if ( style & wxPOPUP_WINDOW )
if ( flags & wxCLIP_SIBLINGS )
style |= WS_CLIPSIBLINGS;
- if ( (flags & wxBORDER_MASK) != wxBORDER_NONE )
+ wxBorder border = (wxBorder)(flags & wxBORDER_MASK);
+ if ( border != wxBORDER_NONE && border != wxBORDER_DEFAULT )
style |= WS_BORDER;
// now deal with ext style if the caller wants it
case wxBORDER_NONE:
case wxBORDER_SIMPLE:
+ case wxBORDER_DEFAULT:
break;
case wxBORDER_STATIC:
*exstyle |= WS_EX_WINDOWEDGE;
break;
- case wxBORDER_DEFAULT:
case wxBORDER_SUNKEN:
*exstyle |= WS_EX_CLIENTEDGE;
break;
// Check if we need to send a LEAVE event
if ( m_mouseInWindow )
{
- if ( !IsMouseInWindow() && !HasCapture())
+ // note that we should generate the leave event whether the window has
+ // or doesn't have mouse capture
+ if ( !IsMouseInWindow() )
{
// Generate a LEAVE event
m_mouseInWindow = FALSE;
}
break;
#endif // __WIN32__
-
- // unfortunately this doesn't really work as then window which
- // doesn't accept focus doesn't get any mouse events neither which
- // means it can't get any input at all
-#if 0 //def __WXUNIVERSAL__
- case WM_NCHITTEST:
- // we shouldn't allow the windows which don't want to get focus to
- // get it
- if ( !AcceptsFocus() )
- {
- rc.result = HTTRANSPARENT;
- processed = TRUE;
- }
- break;
-#endif // __WXUNIVERSAL__
}
if ( !processed )
{
POINT pt;
GetCursorPos( & pt );
+
return wxPoint(pt.x, pt.y);
}