]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/window.cpp
install resource files with wxMSW
[wxWidgets.git] / src / msw / window.cpp
index 78e16bb4d20bea3053fa471cb416023aab11be8f..3d223612143b4bea990573a6a6fe8bee271e0e40 100644 (file)
@@ -2010,7 +2010,10 @@ bool wxWindowMSW::MSWProcessMessage(WXMSG* pMsg)
                       node;
                       node = node->GetNext() )
                 {
-                    if ( node->GetData()->AcceptsFocus() )
+                    wxWindow * const win = node->GetData();
+                    if ( win->AcceptsFocus() &&
+                            !(::GetWindowLong(GetHwndOf(win), GWL_EXSTYLE) &
+                                WS_EX_CONTROLPARENT) )
                     {
                         // it shouldn't hang...
                         canSafelyCallIsDlgMsg = TRUE;
@@ -2019,7 +2022,7 @@ bool wxWindowMSW::MSWProcessMessage(WXMSG* pMsg)
                     }
                 }
             }
-#endif
+#endif // !__WXWINCE__
 
             if ( canSafelyCallIsDlgMsg )
             {
@@ -2978,18 +2981,37 @@ bool wxWindowMSW::MSWCreate(const wxChar *wclass,
     // do create the window
     wxWindowCreationHook hook(this);
 
-    m_hWnd = (WXHWND)::CreateWindowEx
-                       (
-                            extendedStyle,
-                            className,
-                            title ? title : wxEmptyString,
-                            style,
-                            x, y, w, h,
-                            (HWND)MSWGetParent(),
-                            (HMENU)controlId,
-                            wxGetInstance(),
-                            NULL                        // no extra data
-                       );
+#ifdef __WXWINCE__
+    if (extendedStyle == 0)
+    {
+        m_hWnd = (WXHWND)::CreateWindow
+            (
+            className,
+            title ? title : wxEmptyString,
+            style,
+            x, y, w, h,
+            (HWND)MSWGetParent(),
+            (HMENU)controlId,
+            wxGetInstance(),
+            NULL                        // no extra data
+            );
+    }
+    else
+#endif
+    {
+        m_hWnd = (WXHWND)::CreateWindowEx
+            (
+            extendedStyle,
+            className,
+            title ? title : wxEmptyString,
+            style,
+            x, y, w, h,
+            (HWND)MSWGetParent(),
+            (HMENU)controlId,
+            wxGetInstance(),
+            NULL                        // no extra data
+            );
+    }
 
     if ( !m_hWnd )
     {
@@ -3361,9 +3383,7 @@ bool wxWindowMSW::HandleDropFiles(WXWPARAM wParam)
 
         // and now get the file name
         ::DragQueryFile(hFilesInfo, wIndex,
-                        files[wIndex].GetWriteBuf(len), len);
-
-        files[wIndex].UngetWriteBuf();
+                        wxStringBuffer(files[wIndex], len), len);
     }
     DragFinish (hFilesInfo);