2008-09-02 Jonathan Pobst <monkey@jpobst.com>
authorJonathan Pobst <monkey@jpobst.com>
Tue, 2 Sep 2008 15:59:13 +0000 (15:59 -0000)
committerJonathan Pobst <monkey@jpobst.com>
Tue, 2 Sep 2008 15:59:13 +0000 (15:59 -0000)
* XplatUIWin32.cs: Ensure we never send the WS_EX_MDICHILD flag
to Windows when creating a window, as we fake MDI stuffs.
[Fixes bug #421858]

svn path=/trunk/mcs/; revision=112095

mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIWin32.cs

index b42321cb059241baa1a4a17fbc21bb2353837931..4264f15b7957f0216a72639aeaafd27407c9c655 100644 (file)
@@ -1,3 +1,9 @@
+2008-09-02  Jonathan Pobst  <monkey@jpobst.com>
+
+       * XplatUIWin32.cs: Ensure we never send the WS_EX_MDICHILD flag
+       to Windows when creating a window, as we fake MDI stuffs.
+       [Fixes bug #421858]
+
 2008-09-01  Ivan N. Zlatev  <contact@i-nz.net>
 
        * TextBox.cs: Invalidate after UseSystemPasswordChar, so that the 
index 6483d23e9d2acf13974df39401c1575c47903424..200e254b1671796df734133b3b5d51b32ef256d6 100644 (file)
@@ -1612,6 +1612,11 @@ namespace System.Windows.Forms {
                        string class_name = RegisterWindowClass (cp.ClassStyle);
                        HwndCreating = hwnd;
 
+                       // We cannot actually send the WS_EX_MDICHILD flag to Windows because we
+                       // are faking MDI, not uses Windows' version.
+                       if ((cp.WindowExStyle & WindowExStyles.WS_EX_MDICHILD) == WindowExStyles.WS_EX_MDICHILD)
+                               cp.WindowExStyle ^= WindowExStyles.WS_EX_MDICHILD;
+                               
                        WindowHandle = Win32CreateWindow (cp.WindowExStyle, class_name, cp.Caption, cp.WindowStyle, location.X, location.Y, cp.Width, cp.Height, ParentHandle, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero);
 
                        HwndCreating = null;