git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10928
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
#ifndef __WXMICROWIN__
::SetLastError(0);
#endif
#ifndef __WXMICROWIN__
::SetLastError(0);
#endif
if ( !::SetFocus(hWnd) )
{
// was there really an error?
if ( !::SetFocus(hWnd) )
{
// was there really an error?
#ifdef __WXMICROWIN__
// It seems that MicroWindows brings the _parent_ of the
// window to the top, which can be the wrong one.
#ifdef __WXMICROWIN__
// It seems that MicroWindows brings the _parent_ of the
// window to the top, which can be the wrong one.
/* activate (set focus to) specified window*/
::SetFocus(hWnd);
/* activate (set focus to) specified window*/
::SetFocus(hWnd);
#ifdef __WXMICROWIN__
// It seems that MicroWindows brings the _parent_ of the
// window to the top, which can be the wrong one.
#ifdef __WXMICROWIN__
// It seems that MicroWindows brings the _parent_ of the
// window to the top, which can be the wrong one.
/* activate (set focus to) specified window*/
::SetFocus(GetHwnd());
/* activate (set focus to) specified window*/
::SetFocus(GetHwnd());
m_oldWndProc = (WXFARPROC) GetWindowLong(hwnd, GWL_WNDPROC);
wxASSERT( (WXFARPROC) m_oldWndProc != (WXFARPROC) wxWndProc );
m_oldWndProc = (WXFARPROC) GetWindowLong(hwnd, GWL_WNDPROC);
wxASSERT( (WXFARPROC) m_oldWndProc != (WXFARPROC) wxWndProc );
SetWindowLong(hwnd, GWL_WNDPROC, (LONG) wxWndProc);
}
SetWindowLong(hwnd, GWL_WNDPROC, (LONG) wxWndProc);
}
case WM_MBUTTONDOWN:
case WM_MBUTTONUP:
case WM_MBUTTONDBLCLK:
case WM_MBUTTONDOWN:
case WM_MBUTTONUP:
case WM_MBUTTONDBLCLK:
- // MicroWindows seems to ignore the fact that a window
- // is disabled. So catch mouse events and throw them away if necessary.
- wxWindowMSW* win = this;
- while (win)
- {
- if (!win->IsEnabled())
- {
- processed = TRUE;
- break;
- }
- win = win->GetParent();
- if (win && win->IsTopLevel())
- break;
- }
+ // MicroWindows seems to ignore the fact that a window
+ // is disabled. So catch mouse events and throw them away if necessary.
+ wxWindowMSW* win = this;
+ while (win)
+ {
+ if (!win->IsEnabled())
+ {
+ processed = TRUE;
+ break;
+ }
+ win = win->GetParent();
+ if (win && win->IsTopLevel())
+ break;
+ }
if (message == WM_LBUTTONDOWN && AcceptsFocus())
SetFocus();
processed = HandleMouseEvent(message,
GET_X_LPARAM(lParam),
GET_Y_LPARAM(lParam),
if (message == WM_LBUTTONDOWN && AcceptsFocus())
SetFocus();
processed = HandleMouseEvent(message,
GET_X_LPARAM(lParam),
GET_Y_LPARAM(lParam),
#ifdef __WXMICROWIN__
case WM_NCLBUTTONDOWN:
#ifdef __WXMICROWIN__
case WM_NCLBUTTONDOWN:
case WM_NCMBUTTONDOWN:
case WM_NCMBUTTONUP:
case WM_NCMBUTTONDBLCLK:
case WM_NCMBUTTONDOWN:
case WM_NCMBUTTONUP:
case WM_NCMBUTTONDBLCLK:
- #endif
- {
- // MicroWindows seems to ignore the fact that a window
- // is disabled. So catch mouse events and throw them away if necessary.
- processed = FALSE;
- wxWindowMSW* win = this;
- while (win)
- {
- if (!win->IsEnabled())
- {
- processed = TRUE;
- break;
- }
- win = win->GetParent();
- if (win && win->IsTopLevel())
- break;
- }
- break;
-
+#endif
+ {
+ // MicroWindows seems to ignore the fact that a window
+ // is disabled. So catch mouse events and throw them away if necessary.
+ processed = FALSE;
+ wxWindowMSW* win = this;
+ while (win)
+ {
+ if (!win->IsEnabled())
+ {
+ processed = TRUE;
+ break;
+ }
+ win = win->GetParent();
+ if (win && win->IsTopLevel())
+ break;
+ }
+ break;
#ifdef MM_JOY1MOVE // __WXMICROWIN__
case MM_JOY1MOVE:
case MM_JOY2MOVE:
#ifdef MM_JOY1MOVE // __WXMICROWIN__
case MM_JOY1MOVE:
case MM_JOY2MOVE: