]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/window.cpp
If zero time is specified, don't try to sleep when using a timer.
[wxWidgets.git] / src / msw / window.cpp
index 0ff6db44ee0ddddd29c9a30521404f977d81869c..5e72624091aa4307eee660cc2e293828ed8645ec 100644 (file)
     #include "wx/dnd.h"
 #endif
 
     #include "wx/dnd.h"
 #endif
 
+#if wxUSE_ACCESSIBILITY
+    #include "wx/access.h"
+    #include <oleacc.h>
+    #ifndef WM_GETOBJECT
+        #define WM_GETOBJECT 0x003D
+    #endif
+    #ifndef OBJID_CLIENT
+        #define OBJID_CLIENT 0xFFFFFFFC
+    #endif
+#endif
+
 #include "wx/menuitem.h"
 #include "wx/log.h"
 
 #include "wx/menuitem.h"
 #include "wx/log.h"
 
@@ -1876,7 +1887,7 @@ static void wxYieldForCommandsOnly()
     {
         wxTheApp->DoMessage((WXMSG *)&msg);
     }
     {
         wxTheApp->DoMessage((WXMSG *)&msg);
     }
-    
+
     // If we retrieved a WM_QUIT, insert back into the message queue.
     if (msg.message == WM_QUIT)
         ::PostQuitMessage(0);
     // If we retrieved a WM_QUIT, insert back into the message queue.
     if (msg.message == WM_QUIT)
         ::PostQuitMessage(0);
@@ -2827,6 +2838,20 @@ long wxWindowMSW::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam
             }
             break;
 
             }
             break;
 
+#if wxUSE_ACCESSIBILITY
+        case WM_GETOBJECT:
+            {
+                //WPARAM dwFlags = (WPARAM) (DWORD) wParam;
+                LPARAM dwObjId = (LPARAM) (DWORD) lParam;
+
+                if (dwObjId == OBJID_CLIENT && GetOrCreateAccessible())
+                {
+                    return LresultFromObject(IID_IAccessible, wParam, (IUnknown*) GetAccessible()->GetIAccessible());
+                }
+                break;
+            }
+#endif
+
 #if defined(__WIN32__) && defined(WM_HELP)
         case WM_HELP:
             {
 #if defined(__WIN32__) && defined(WM_HELP)
         case WM_HELP:
             {
@@ -3300,8 +3325,7 @@ bool wxWindowMSW::HandleCreate(WXLPCREATESTRUCT cs, bool *mayCreate)
 
 bool wxWindowMSW::HandleDestroy()
 {
 
 bool wxWindowMSW::HandleDestroy()
 {
-    wxWindowDestroyEvent event((wxWindow *)this);
-    (void)GetEventHandler()->ProcessEvent(event);
+    SendDestroyEvent();
 
     // delete our drop target if we've got one
 #if wxUSE_DRAG_AND_DROP
 
     // delete our drop target if we've got one
 #if wxUSE_DRAG_AND_DROP
@@ -4836,6 +4860,12 @@ int wxCharCodeMSWToWX(int keySym)
         case VK_OEM_6:      id = ']'; break;
         case VK_OEM_7:      id = '\''; break;
 
         case VK_OEM_6:      id = ']'; break;
         case VK_OEM_7:      id = '\''; break;
 
+#ifdef VK_APPS
+        case VK_LWIN:       id = WXK_WINDOWS_LEFT; break;
+        case VK_RWIN:       id = WXK_WINDOWS_RIGHT; break;
+        case VK_APPS:       id = WXK_WINDOWS_MENU; break;
+#endif // VK_APPS defined
+
         default:
             id = 0;
     }
         default:
             id = 0;
     }