Hello,

> anyone already checked if its possible to use or adept Weifen Luo's DockPanel 
> Suite 
> with mono winforms? would be great if this could be possibe. :)
> 
> here's a link to the suite:
> http://sourceforge.net/projects/dockpanelsuite

Chris is correct, the code does a fair amount of P/Invoke into User32.

Luckly there are only 32 places where this happens, I went ahead and
ifdefed out all the pieces, and added warning messages for all the
missing routines, and packaged it as a tarball.

It does not currently work, the tarball am posting starts up, does not
paint what I believe is the area where the dock is, and I believe the
Makefile generated is incorrect as it is unable to find the string
resources (the names on the resources is wrong).

All my changes are attached as a patch, or available in a ready-to-use
tarball here:

        http://tirania.org/dockpanel-port.tar.gz

This could be used as a starting point;  Maybe we could provide a
Managed.Helper.Winforms.dll that would provide similar functionality to
the one this library depends on, and eventually we could have a
"Guidelines to port you winforms app with lots of pinvokes".

Miguel.
diff -ruN --exclude='*~' dockpanel.orig/DockSample/Makefile dockpanel/DockSample/Makefile
--- dockpanel.orig/DockSample/Makefile	1969-12-31 19:00:00.000000000 -0500
+++ dockpanel/DockSample/Makefile	2006-11-12 07:55:23.000000000 -0500
@@ -0,0 +1,71 @@
+ifndef TARGET
+	TARGET=./bin/Debug
+else
+	TARGET=./bin/$(TARGET)
+endif
+
+MCS=mcs
+RESGEN=resgen
+ifndef (RELEASE)
+	MCSFLAGS=-debug 
+endif
+LIBS=-lib:/mono/lib/pkgconfig/../../lib/mono/1.0 -lib:/mono/lib/pkgconfig/../../lib/mono/gtk-sharp
+
+
+DOCKSAMPLE_EXE=$(TARGET)/DockSample.exe
+DOCKSAMPLE_PDB=$(TARGET)/DockSample.exe
+DOCKSAMPLE_SRC=AboutDialog.cs \
+	AssemblyInfo.cs \
+	DummyDoc.cs \
+	DummyOutputWindow.cs \
+	DummyPropertyWindow.cs \
+	DummySolutionExplorer.cs \
+	DummyTaskList.cs \
+	DummyToolbox.cs \
+	MainForm.cs \
+	Extender/Extender.cs \
+	Extender/FromBase/AutoHideStripFromBase.cs \
+	Extender/FromBase/AutoHideTabFromBase.cs \
+	Extender/FromBase/DockPaneCaptionFromBase.cs \
+	Extender/FromBase/DockPaneStripFromBase.cs \
+	Extender/FromBase/DockPaneTabFromBase.cs \
+	Extender/FromBase/Helpers/DockHelper.cs \
+	Extender/FromBase/Helpers/ResourceHelper.cs \
+	Extender/FromBase/Win32/Enums.cs \
+	Extender/FromBase/Win32/Gdi32.cs \
+	Extender/FromBase/Win32/Structs.cs \
+	Extender/FromBase/Win32/User32.cs \
+	Extender/Override/AutoHideStripOverride.cs \
+	Extender/Override/DockPaneStripOverride.cs
+DOCKSAMPLE_RESX=AboutDialog.resx DummyDoc.resx DummyOutputWindow.resx DummyPropertyWindow.resx DummySolutionExplorer.resx DummyTaskList.resx DummyToolbox.resx MainForm.resx 
+DOCKSAMPLE_RES=-resource:AboutDialog.resources,DockSample.AboutDialog.resources \
+	-resource:DummyDoc.resources,DockSample.DummyDoc.resources \
+	-resource:DummyOutputWindow.resources,DockSample.DummyOutputWindow.resources \
+	-resource:DummyPropertyWindow.resources,DockSample.DummyPropertyWindow.resources \
+	-resource:DummySolutionExplorer.resources,DockSample.DummySolutionExplorer.resources \
+	-resource:DummyTaskList.resources,DockSample.DummyTaskList.resources \
+	-resource:DummyToolbox.resources,DockSample.DummyToolbox.resources \
+	-resource:MainForm.resources,DockSample.MainForm.resources \
+	-resource:Resources/DockPanel.xml,DockSample.Resources.DockPanel.xml
+
+all: \
+$(DOCKSAMPLE_EXE)
+$(DOCKSAMPLE_EXE): $(DOCKSAMPLE_SRC) # Missing dependency project WinFormsUI ID:{D3C782BA-178E-4235-A3BA-8C11DEBB6BEE}?
+	-mkdir -p $(TARGET)
+	$(RESGEN) /compile AboutDialog.resx DummyDoc.resx DummyOutputWindow.resx DummyPropertyWindow.resx DummySolutionExplorer.resx DummyTaskList.resx DummyToolbox.resx MainForm.resx 
+	$(MCS) $(MCSFLAGS) $(LIBS) -r:System.dll -r:System.Data.dll -r:System.Drawing.dll -r:System.Windows.Forms.dll -r:System.Xml.dll -r:WinFormsUI.dll -r:System.Web.Services.dll -target:winexe -out:$(DOCKSAMPLE_EXE) $(DOCKSAMPLE_RES) $(DOCKSAMPLE_SRC)
+
+
+# common targets
+
+all:	$(DOCKSAMPLE_EXE)
+
+clean:
+	-rm -f "$(DOCKSAMPLE_EXE)" 2> /dev/null
+	-rm -f "$(DOCKSAMPLE_PDB)" 2> /dev/null
+
+
+# project names as targets
+
+DockSample: $(DOCKSAMPLE_EXE)
+
diff -ruN --exclude='*~' dockpanel.orig/Makefile dockpanel/Makefile
--- dockpanel.orig/Makefile	1969-12-31 19:00:00.000000000 -0500
+++ dockpanel/Makefile	2006-11-12 08:02:39.000000000 -0500
@@ -0,0 +1,4 @@
+all:
+	(cd WinFormsUI/; make && gacutil -i  bin/Debug/WeifenLuo.WinFormsUI.Docking.dll)
+	(cd DockSample; make && mono bin/Debug/DockSample.exe)
+
diff -ruN --exclude='*~' dockpanel.orig/WinFormsUI/AssemblyInfo.cs dockpanel/WinFormsUI/AssemblyInfo.cs
--- dockpanel.orig/WinFormsUI/AssemblyInfo.cs	2006-02-11 14:31:46.000000000 -0500
+++ dockpanel/WinFormsUI/AssemblyInfo.cs	2006-11-12 07:58:55.000000000 -0500
@@ -53,5 +53,5 @@
 //       documentation for more information on this.
 //
 [assembly: AssemblyDelaySign(false)]
-[assembly: AssemblyKeyFile("")]
+[assembly: AssemblyKeyFile("file.snk")]
 [assembly: AssemblyKeyName("")]
diff -ruN --exclude='*~' dockpanel.orig/WinFormsUI/Components/DragForm.cs dockpanel/WinFormsUI/Components/DragForm.cs
--- dockpanel.orig/WinFormsUI/Components/DragForm.cs	2006-11-12 08:06:47.000000000 -0500
+++ dockpanel/WinFormsUI/Components/DragForm.cs	2006-11-12 08:06:44.000000000 -0500
@@ -66,8 +66,9 @@
 		{
 			if (bActivate)
 				Show();
-			else
-				User32.ShowWindow(Handle, (int)Win32.ShowWindowStyles.SW_SHOWNOACTIVATE);
+			else {
+				Console.WriteLine ("User32.ShowWindow(Handle, (int)Win32.ShowWindowStyles.SW_SHOWNOACTIVATE);");
+			}
 		}
 	}
 }
diff -ruN --exclude='*~' dockpanel.orig/WinFormsUI/Components/MdiClientController.cs dockpanel/WinFormsUI/Components/MdiClientController.cs
--- dockpanel.orig/WinFormsUI/Components/MdiClientController.cs	2006-11-12 08:06:47.000000000 -0500
+++ dockpanel/WinFormsUI/Components/MdiClientController.cs	2006-11-12 08:06:44.000000000 -0500
@@ -134,9 +134,15 @@
 				// http://www.codeproject.com/cs/miscctrl/CsAddingBorders.asp
 
 				// Get styles using Win32 calls
-				int style = User32.GetWindowLong(MdiClient.Handle, (int)Win32.GetWindowLongIndex.GWL_STYLE);
-				int exStyle = User32.GetWindowLong(MdiClient.Handle, (int)Win32.GetWindowLongIndex.GWL_EXSTYLE);
-
+#if false
+				//int style = User32.GetWindowLong(MdiClient.Handle, (int)Win32.GetWindowLongIndex.GWL_STYLE);
+				//int exStyle = User32.GetWindowLong(MdiClient.Handle, (int)Win32.GetWindowLongIndex.GWL_EXSTYLE);
+#else
+				int style = 0;
+				int exStyle = 0;
+				Console.WriteLine ("Fetching STYLE and EXSTYLE");
+				
+#endif
 				// Add or remove style flags as necessary.
 				switch(m_borderStyle)
 				{
@@ -155,11 +161,14 @@
 						exStyle &= ~((int)Win32.WindowExStyles.WS_EX_CLIENTEDGE);
 						break;
 				}
-					
+
+#if false
 				// Set the styles using Win32 calls
 				User32.SetWindowLong(MdiClient.Handle, (int)Win32.GetWindowLongIndex.GWL_STYLE, style);
 				User32.SetWindowLong(MdiClient.Handle, (int)Win32.GetWindowLongIndex.GWL_EXSTYLE, exStyle);
-
+#else
+				Console.WriteLine ("Setting style");
+#endif
 				// Cause an update of the non-client area.
 				UpdateStyles();
 			}
@@ -341,6 +350,10 @@
 
 				case (int)Win32.Msgs.WM_PAINT:
 
+#if true
+					Console.WriteLine ("MdiClientController: Code to fetch the paintStruct need to be implemented");
+					break;
+#else
 					// This code is influenced by Steve McMahon's article:
 					// "Painting in the MDI Client Area".
 					// http://vbaccelerator.com/article.asp?id=4306
@@ -391,6 +404,7 @@
 
 					User32.EndPaint(m.HWnd, ref paintStruct);
 					return;
+#endif
 	
 				case (int)Win32.Msgs.WM_SIZE:
 					// Repaint on every resize.
@@ -401,8 +415,9 @@
 				case (int)Win32.Msgs.WM_NCCALCSIZE:
 					// If AutoScroll is set to false, hide the scrollbars when the control
 					// calculates its non-client area.
-					if(!AutoScroll)
-						User32.ShowScrollBar(m.HWnd, (int)Win32.ScrollBars.SB_BOTH, 0 /*false*/);
+					if(!AutoScroll){
+						Console.WriteLine ("MdiClientController: User32.ShowScrollBar(m.HWnd, (int)Win32.ScrollBars.SB_BOTH, 0 /*false*/);");
+					}
 					break;
 			}
 		
@@ -544,6 +559,9 @@
 			// To show style changes, the non-client area must be repainted. Using the
 			// control's Invalidate method does not affect the non-client area.
 			// Instead use a Win32 call to signal the style has changed.
+#if true
+			Console.WriteLine ("User32.SetWindowPos");
+#else
 			User32.SetWindowPos(MdiClient.Handle, IntPtr.Zero, 0, 0, 0, 0,
 				Win32.FlagsSetWindowPos.SWP_NOACTIVATE |
 				Win32.FlagsSetWindowPos.SWP_NOMOVE |
@@ -551,6 +569,7 @@
 				Win32.FlagsSetWindowPos.SWP_NOZORDER |
 				Win32.FlagsSetWindowPos.SWP_NOOWNERZORDER |
 				Win32.FlagsSetWindowPos.SWP_FRAMECHANGED);
+#endif
 		}
 	}
 }
diff -ruN --exclude='*~' dockpanel.orig/WinFormsUI/Docking/AutoHideStripBase.cs dockpanel/WinFormsUI/Docking/AutoHideStripBase.cs
--- dockpanel.orig/WinFormsUI/Docking/AutoHideStripBase.cs	2006-11-12 08:06:47.000000000 -0500
+++ dockpanel/WinFormsUI/Docking/AutoHideStripBase.cs	2006-11-12 08:06:44.000000000 -0500
@@ -194,10 +194,14 @@
 			if (content != null && DockPanel.ActiveAutoHideContent != content)
 				DockPanel.ActiveAutoHideContent = content;
 
+#if true
+			Console.WriteLine ("AutoHideStripBase, TrackMouseEvent missing");
+#else
 			// requires further tracking of mouse hover behavior,
 			// call TrackMouseEvent
 			Win32.TRACKMOUSEEVENTS tme = new Win32.TRACKMOUSEEVENTS(Win32.TRACKMOUSEEVENTS.TME_HOVER, Handle, Win32.TRACKMOUSEEVENTS.HOVER_DEFAULT);
 			User32.TrackMouseEvent(ref tme);
+#endif
 		}
 
 		/// <exclude />
diff -ruN --exclude='*~' dockpanel.orig/WinFormsUI/Docking/AutoHideWindow.cs dockpanel/WinFormsUI/Docking/AutoHideWindow.cs
--- dockpanel.orig/WinFormsUI/Docking/AutoHideWindow.cs	2006-11-12 08:06:47.000000000 -0500
+++ dockpanel/WinFormsUI/Docking/AutoHideWindow.cs	2006-11-12 08:06:44.000000000 -0500
@@ -275,8 +275,11 @@
 			// start the timer
 			uint hovertime = 0;
 
+#if true
+			Console.WriteLine ("AutoHideWindow: Getting GetMouseHoverTime parameter");
+#else
 			User32.SystemParametersInfo(Win32.SystemParametersInfoActions.GetMouseHoverTime, 0, ref hovertime, 0);
-
+#endif
 			// assign a default value 400 in case of setting Timer.Interval invalid value exception
 			if (((int)hovertime) <= 0)
 				hovertime = 400;
diff -ruN --exclude='*~' dockpanel.orig/WinFormsUI/Docking/DockContentHandler.cs dockpanel/WinFormsUI/Docking/DockContentHandler.cs
--- dockpanel.orig/WinFormsUI/Docking/DockContentHandler.cs	2006-11-12 08:06:47.000000000 -0500
+++ dockpanel/WinFormsUI/Docking/DockContentHandler.cs	2006-11-12 08:06:44.000000000 -0500
@@ -129,7 +129,7 @@
 
 				m_closeButton = value;
 				if (Pane != null)
-					if (Pane.ActiveContent == this)
+					if (Pane.ActiveContent == (IDockContent) this)
 						Pane.RefreshChanges();
 			}
 		}
@@ -252,6 +252,9 @@
 					Form.TopLevel = false;
 					Form.FormBorderStyle = FormBorderStyle.None;
 					Form.ShowInTaskbar = false;
+#if true
+					Console.WriteLine ("DockContentHandler: SetWindowPos missing");
+#else
 					User32.SetWindowPos(Form.Handle, IntPtr.Zero, 0, 0, 0, 0,
 						Win32.FlagsSetWindowPos.SWP_NOACTIVATE |
 						Win32.FlagsSetWindowPos.SWP_NOMOVE |
@@ -259,6 +262,7 @@
 						Win32.FlagsSetWindowPos.SWP_NOZORDER |
 						Win32.FlagsSetWindowPos.SWP_NOOWNERZORDER |
 						Win32.FlagsSetWindowPos.SWP_FRAMECHANGED);
+#endif
 					m_dockPaneTab = DockPanel.DockPaneTabFactory.CreateDockPaneTab(Content);
 					m_autoHideTab = DockPanel.AutoHideTabFactory.CreateAutoHideTab(Content);
 				}
@@ -608,6 +612,9 @@
 					Form.Activate();
 				else if (!Form.ContainsFocus)
 				{
+#if true
+					Console.WriteLine ("Manually setting focus not supported");
+#else
 					if (Contains(ActiveWindowHandle))
 						User32.SetFocus(ActiveWindowHandle);
 
@@ -617,6 +624,7 @@
 							// Since DockContent Form is not selectalbe, use Win32 SetFocus instead
 							User32.SetFocus(Form.Handle);
 					}
+#endif
 				}
 			}
 		}
diff -ruN --exclude='*~' dockpanel.orig/WinFormsUI/Docking/DockIndicator.cs dockpanel/WinFormsUI/Docking/DockIndicator.cs
--- dockpanel.orig/WinFormsUI/Docking/DockIndicator.cs	2006-11-12 08:06:47.000000000 -0500
+++ dockpanel/WinFormsUI/Docking/DockIndicator.cs	2006-11-12 08:06:44.000000000 -0500
@@ -517,7 +517,7 @@
 			if (DragHandler.DragControl == DockPane)
 				return false;
 
-			if (DragHandler.DragControl == DockPane.DockListContainer)
+			if ((object)DragHandler.DragControl == (object)DockPane.DockListContainer)
 				return false;
 
 			IDockContent content = DragHandler.DragControl as IDockContent;
diff -ruN --exclude='*~' dockpanel.orig/WinFormsUI/Docking/DockList.cs dockpanel/WinFormsUI/Docking/DockList.cs
--- dockpanel.orig/WinFormsUI/Docking/DockList.cs	2006-11-12 08:06:47.000000000 -0500
+++ dockpanel/WinFormsUI/Docking/DockList.cs	2006-11-12 08:06:44.000000000 -0500
@@ -85,8 +85,12 @@
 			if (InnerList.Count == 0 && Container.DockState == DockState.Float)
 			{
 				FloatWindow floatWindow = (FloatWindow)Container;
+#if true
+				Console.WriteLine ("DockList: missing call to WM_CHECKDISPOSE");
+#else
 				if (!floatWindow.Disposing && !floatWindow.IsDisposed)
 					User32.PostMessage(((FloatWindow)Container).Handle, FloatWindow.WM_CHECKDISPOSE, 0, 0);
+#endif
 			}
 		}
 
diff -ruN --exclude='*~' dockpanel.orig/WinFormsUI/Docking/DockPanel.cs dockpanel/WinFormsUI/Docking/DockPanel.cs
--- dockpanel.orig/WinFormsUI/Docking/DockPanel.cs	2006-11-12 08:06:47.000000000 -0500
+++ dockpanel/WinFormsUI/Docking/DockPanel.cs	2006-11-12 08:06:44.000000000 -0500
@@ -155,10 +155,10 @@
 				IntPtr wParam = Marshal.ReadIntPtr(e.lParam, IntPtr.Size * 2);
 				DockPane pane = GetPaneFromHandle(wParam);
 				if (pane == null)
-					User32.PostMessage(this.Handle, WM_REFRESHACTIVEWINDOW, 0, 0);
+					Console.WriteLine ("Missing DockPanel: User32.PostMessage(this.Handle, WM_REFRESHACTIVEWINDOW, 0, 0);");
 			}
 			else if (msg == Win32.Msgs.WM_SETFOCUS)
-				User32.PostMessage(this.Handle, WM_REFRESHACTIVEWINDOW, 0, 0);
+				Console.WriteLine ("MIssing DockPanel: User32.PostMessage(this.Handle, WM_REFRESHACTIVEWINDOW, 0, 0);");
 		}
 
 		private bool m_disposed = false;
@@ -230,7 +230,7 @@
 		}
 		private void SetActivePane()
 		{
-			DockPane value = GetPaneFromHandle(User32.GetFocus());
+			DockPane value = null; Console.WriteLine ("Missing DockPanel/SetActivePane: GetPaneFromHandle(User32.GetFocus());");
 			if (m_activePane == value)
 				return;
 
@@ -1277,4 +1277,4 @@
 			DockPanelPersist.LoadFromXml(this, stream, deserializeContent, closeStream);
 		}
 	}
-}
\ No newline at end of file
+}
diff -ruN --exclude='*~' dockpanel.orig/WinFormsUI/Docking/DragHandlerBase.cs dockpanel/WinFormsUI/Docking/DragHandlerBase.cs
--- dockpanel.orig/WinFormsUI/Docking/DragHandlerBase.cs	2006-11-12 08:06:47.000000000 -0500
+++ dockpanel/WinFormsUI/Docking/DragHandlerBase.cs	2006-11-12 08:06:44.000000000 -0500
@@ -30,13 +30,14 @@
 		private WndProcCallBack m_wndProcCallBack;
 		private IntPtr m_prevWndFunc;
 		private delegate IntPtr WndProcCallBack(IntPtr hwnd, int Msg, IntPtr wParam, IntPtr lParam);
+#if false
 		[DllImport("User32.dll")]
 		private static extern IntPtr SetWindowLong(IntPtr hWnd, int nIndex, WndProcCallBack wndProcCallBack);
 		[DllImport("User32.dll")]
 		private static extern IntPtr SetWindowLong(IntPtr hWnd, int nIndex, IntPtr wndFunc);
 		[DllImport("User32.dll")]
 		private static extern IntPtr CallWindowProc(IntPtr prevWndFunc, IntPtr hWnd, int iMsg, IntPtr wParam, IntPtr lParam);
-
+#endif
 		public DragHandlerBase()
 		{
 			m_wndProcCallBack = new WndProcCallBack(this.WndProc);
@@ -45,12 +46,13 @@
 		private void AssignHandle(IntPtr hWnd)
 		{
 			m_hWnd = hWnd;
-			m_prevWndFunc = SetWindowLong(hWnd, -4, m_wndProcCallBack);	// GWL_WNDPROC = -4
+			
+			Console.WriteLine ("Missing (AssignHandle): m_prevWndFunc = SetWindowLong(hWnd, -4, m_wndProcCallBack);	// GWL_WNDPROC = -4");
 		}
 
 		private void ReleaseHandle()
 		{
-			SetWindowLong(m_hWnd, -4, m_prevWndFunc);	// GWL_WNDPROC = -4
+			Console.WriteLine ("Missing (ReleaseHandle): SetWindowLong(m_hWnd, -4, m_prevWndFunc);	// GWL_WNDPROC = -4");
 			m_hWnd = IntPtr.Zero;
 			m_prevWndFunc = IntPtr.Zero;
 		}
@@ -76,9 +78,12 @@
 
 				m_startMousePosition = Control.MousePosition;
 
+#if true
+				Console.WriteLine ("Missing BeginDrag, DragDetect");
+#else
 				if (!User32.DragDetect(c.Handle, StartMousePosition))
 					return false;
-
+#endif
 				m_dragControl = c;
 				c.FindForm().Capture = true;
 				AssignHandle(c.FindForm().Handle);
@@ -130,7 +135,12 @@
 			if (iMsg == (int)Win32.Msgs.WM_CANCELMODE || iMsg == (int)Win32.Msgs.WM_CAPTURECHANGED)
 				EndDrag(true);
 
+#if true
+			Console.WriteLine ("DragHandlerBase, WndProc, missing callWindowProc");
+			return IntPtr.Zero;
+#else
 			return CallWindowProc(m_prevWndFunc, hWnd, iMsg, wParam, lParam);
+#endif
 		}
 	}
-}
\ No newline at end of file
+}
diff -ruN --exclude='*~' dockpanel.orig/WinFormsUI/Docking/DragHandler.cs dockpanel/WinFormsUI/Docking/DragHandler.cs
--- dockpanel.orig/WinFormsUI/Docking/DragHandler.cs	2006-11-12 08:06:47.000000000 -0500
+++ dockpanel/WinFormsUI/Docking/DragHandler.cs	2006-11-12 08:06:44.000000000 -0500
@@ -202,7 +202,7 @@
 
 		private void Content_OnEndDrag(bool abort)
 		{
-			User32.SetCursor(DragControl.Cursor.Handle);
+			Console.WriteLine ("Missing, OnEndDrag:  User32.SetCursor(DragControl.Cursor.Handle);");
 
 			if (abort)
 				return;
@@ -293,7 +293,7 @@
 
 		private void Pane_OnEndDrag(bool abort)
 		{
-			User32.SetCursor(DragControl.Cursor.Handle);
+			Console.WriteLine ("Missing: OnEndDrag: User32.SetCursor(DragControl.Cursor.Handle);");
 
 			if (abort)
 				return;
@@ -792,11 +792,11 @@
 
 			if (!DockOutline.FlagTestDrop)
 			{
-				User32.SetCursor(Cursors.No.Handle);
+				Console.WriteLine ("Missing, TestDrop: User32.SetCursor(Cursors.No.Handle);");
 				DockOutline.Show();
 			}
 			else
-				User32.SetCursor(DragControl.Cursor.Handle);
+				Console.WriteLine ("Missing, TestSrop: User32.SetCursor(DragControl.Cursor.Handle);");
 		}
 
 		private Rectangle GetFloatWindowBounds()
diff -ruN --exclude='*~' dockpanel.orig/WinFormsUI/Docking/FloatWindow.cs dockpanel/WinFormsUI/Docking/FloatWindow.cs
--- dockpanel.orig/WinFormsUI/Docking/FloatWindow.cs	2006-11-12 08:06:47.000000000 -0500
+++ dockpanel/WinFormsUI/Docking/FloatWindow.cs	2006-11-12 08:06:44.000000000 -0500
@@ -196,6 +196,10 @@
 				if (IsDisposed)
 					return;
 
+#if true
+				Console.WriteLine ("FloatWindow, Missing: WM_NCHITTEST");
+				return;
+#else
 				uint result = User32.SendMessage(this.Handle, (int)Win32.Msgs.WM_NCHITTEST, 0, (uint)m.LParam);
 				if (result == 2 && DockPanel.AllowRedocking && this.AllowRedocking)	// HITTEST_CAPTION
 				{
@@ -206,6 +210,7 @@
 					base.WndProc(ref m);
 
 				return;
+#endif
 			}
 			else if (m.Msg == (int)Win32.Msgs.WM_CLOSE)
 			{
@@ -238,12 +243,16 @@
 			}
 			else if (m.Msg == (int)Win32.Msgs.WM_NCLBUTTONDBLCLK)
 			{
+#if true
+				Console.WriteLine ("FloatWindow: Missing, WM_NCHITTEST");
+#else
 				uint result = User32.SendMessage(this.Handle, (int)Win32.Msgs.WM_NCHITTEST, 0, (uint)m.LParam);
 				if (result != 2)	// HITTEST_CAPTION
 				{
 					base.WndProc(ref m);
 					return;
 				}
+#endif
 		
 				Visible = false;
 				DockPanel.SuspendLayout(true);
@@ -319,8 +328,12 @@
 
 			Point ptMouse = Control.MousePosition;
 			uint lParam = Win32Helper.MakeLong(ptMouse.X, ptMouse.Y);
+#if true
+			Console.WriteLine ("FloatWindow, Missing WM_NCHITTEST");
+#else
 			if (User32.SendMessage(Handle, (int)Win32.Msgs.WM_NCHITTEST, 0, lParam) == (uint)Win32.HitTest.HTCAPTION)
 				dragHandler.DockOutline.Show(DisplayingList[0], -1);
+#endif
 		}
 	}
 }
diff -ruN --exclude='*~' dockpanel.orig/WinFormsUI/Helpers/LocalWindowsHook.cs dockpanel/WinFormsUI/Helpers/LocalWindowsHook.cs
--- dockpanel.orig/WinFormsUI/Helpers/LocalWindowsHook.cs	2006-11-12 08:06:47.000000000 -0500
+++ dockpanel/WinFormsUI/Helpers/LocalWindowsHook.cs	2006-11-12 08:06:44.000000000 -0500
@@ -103,8 +103,12 @@
 		// Install the hook
 		public void Install()
 		{
+#if true
+	Console.WriteLine ("Not installing anything");
+#else
 			int threadId = Kernel32.GetCurrentThreadId();
 			m_hhook = SetWindowsHookEx(m_hookType, m_filterFunc, IntPtr.Zero, threadId);
+#endif
 		}
 
 		// Uninstall the hook
diff -ruN --exclude='*~' dockpanel.orig/WinFormsUI/Helpers/Win32Helper.cs dockpanel/WinFormsUI/Helpers/Win32Helper.cs
--- dockpanel.orig/WinFormsUI/Helpers/Win32Helper.cs	2006-11-12 08:06:47.000000000 -0500
+++ dockpanel/WinFormsUI/Helpers/Win32Helper.cs	2006-11-12 08:06:44.000000000 -0500
@@ -21,8 +21,12 @@
 			Win32.POINT pt32;
 			pt32.x = pt.X;
 			pt32.y = pt.Y;
-
+#if true
+			Console.WriteLine ("Missing Win32Helper call to WindowFromPoint ");
+			return null;
+#else
 			return Control.FromChildHandle(User32.WindowFromPoint(pt32));
+#endif
 		}
 
 		public static uint MakeLong(int low, int high)
diff -ruN --exclude='*~' dockpanel.orig/WinFormsUI/Makefile dockpanel/WinFormsUI/Makefile
--- dockpanel.orig/WinFormsUI/Makefile	1969-12-31 19:00:00.000000000 -0500
+++ dockpanel/WinFormsUI/Makefile	2006-11-12 07:48:40.000000000 -0500
@@ -0,0 +1,134 @@
+ifndef TARGET
+	TARGET=./bin/Debug
+else
+	TARGET=./bin/$(TARGET)
+endif
+
+MCS=mcs
+RESGEN=resgen
+ifndef (RELEASE)
+	MCSFLAGS=-debug 
+endif
+LIBS=-lib:/mono/lib/pkgconfig/../../lib/mono/1.0 -lib:/mono/lib/pkgconfig/../../lib/mono/gtk-sharp
+
+
+WINFORMSUI_DLL=$(TARGET)/WeifenLuo.WinFormsUI.Docking.dll
+WINFORMSUI_PDB=$(TARGET)/WeifenLuo.WinFormsUI.Docking.pdb
+WINFORMSUI_SRC=AssemblyInfo.cs \
+	Components/DragForm.cs \
+	Components/MdiClientController.cs \
+	Controls/InertButton.cs \
+	Docking/AutoHidePane.cs \
+	Docking/AutoHidePaneCollection.cs \
+	Docking/AutoHideStateCollection.cs \
+	Docking/AutoHideStripBase.cs \
+	Docking/AutoHideStripVS2003.cs \
+	Docking/AutoHideTab.cs \
+	Docking/AutoHideTabCollection.cs \
+	Docking/AutoHideTabVS2003.cs \
+	Docking/AutoHideWindow.cs \
+	Docking/AutoHideWindowSplitter.cs \
+	Docking/DisplayingDockList.cs \
+	Docking/DockAreasEditor.cs \
+	Docking/DockContent.cs \
+	Docking/DockContentCollection.cs \
+	Docking/DockContentHandler.cs \
+	Docking/DockHelper.cs \
+	Docking/DockIndicator.cs \
+	Docking/DockList.cs \
+	Docking/DockOutline.cs \
+	Docking/DockOutlineBase.cs \
+	Docking/DockPane.cs \
+	Docking/DockPaneCaptionBase.cs \
+	Docking/DockPaneCaptionVS2003.cs \
+	Docking/DockPaneCollection.cs \
+	Docking/DockPanel.cs \
+	Docking/DockPanelExtender.cs \
+	Docking/DockPanelPersist.cs \
+	Docking/DockPaneSplitter.cs \
+	Docking/DockPaneStripBase.cs \
+	Docking/DockPaneStripVS2003.cs \
+	Docking/DockPaneTab.cs \
+	Docking/DockPaneTabCollection.cs \
+	Docking/DockPaneTabVS2003.cs \
+	Docking/DockWindow.cs \
+	Docking/DockWindowCollection.cs \
+	Docking/DockWindowSplitter.cs \
+	Docking/DragHandler.cs \
+	Docking/DragHandlerBase.cs \
+	Docking/DummyControl.cs \
+	Docking/Enums.cs \
+	Docking/EventArgs.cs \
+	Docking/FloatWindow.cs \
+	Docking/FloatWindowCollection.cs \
+	Docking/Interfaces.cs \
+	Docking/Measures.cs \
+	Docking/NestedDockingStatus.cs \
+	Docking/SplitterBase.cs \
+	Docking/SplitterOutline.cs \
+	Helpers/DrawHelper.cs \
+	Helpers/Localization.cs \
+	Helpers/LocalWindowsHook.cs \
+	Helpers/ResourceHelper.cs \
+	Helpers/Win32Helper.cs \
+	Win32/Enums.cs \
+	Win32/Gdi32.cs \
+	Win32/Kernel32.cs \
+	Win32/Structs.cs \
+	Win32/User32.cs
+WINFORMSUI_RESX=Docking/DockPanel.resx Docking/DockWindow.resx 
+WINFORMSUI_RES=-resource:Strings.resX,WeifenLuo.WinFormsUI.Strings.resX \
+	-resource:Docking/DockPanel.resources,WeifenLuo.WinFormsUI.Docking.DockPanel.resources \
+	-resource:Docking/DockWindow.resources,WeifenLuo.WinFormsUI.Docking.DockWindow.resources \
+	-resource:Resources/DockIndicator.PaneDiamond.bmp,WeifenLuo.WinFormsUI.Resources.DockIndicator.PaneDiamond.bmp \
+	-resource:Resources/DockIndicator.PaneDiamond.Bottom.bmp,WeifenLuo.WinFormsUI.Resources.DockIndicator.PaneDiamond.Bottom.bmp \
+	-resource:Resources/DockIndicator.PaneDiamond.Fill.bmp,WeifenLuo.WinFormsUI.Resources.DockIndicator.PaneDiamond.Fill.bmp \
+	-resource:Resources/DockIndicator.PaneDiamond.HotSpot.bmp,WeifenLuo.WinFormsUI.Resources.DockIndicator.PaneDiamond.HotSpot.bmp \
+	-resource:Resources/DockIndicator.PaneDiamond.HotSpotIndex.bmp,WeifenLuo.WinFormsUI.Resources.DockIndicator.PaneDiamond.HotSpotIndex.bmp \
+	-resource:Resources/DockIndicator.PaneDiamond.Left.bmp,WeifenLuo.WinFormsUI.Resources.DockIndicator.PaneDiamond.Left.bmp \
+	-resource:Resources/DockIndicator.PaneDiamond.Right.bmp,WeifenLuo.WinFormsUI.Resources.DockIndicator.PaneDiamond.Right.bmp \
+	-resource:Resources/DockIndicator.PaneDiamond.Top.bmp,WeifenLuo.WinFormsUI.Resources.DockIndicator.PaneDiamond.Top.bmp \
+	-resource:Resources/DockIndicator.PanelBottom.Active.bmp,WeifenLuo.WinFormsUI.Resources.DockIndicator.PanelBottom.Active.bmp \
+	-resource:Resources/DockIndicator.PanelBottom.bmp,WeifenLuo.WinFormsUI.Resources.DockIndicator.PanelBottom.bmp \
+	-resource:Resources/DockIndicator.PanelFill.Active.bmp,WeifenLuo.WinFormsUI.Resources.DockIndicator.PanelFill.Active.bmp \
+	-resource:Resources/DockIndicator.PanelFill.bmp,WeifenLuo.WinFormsUI.Resources.DockIndicator.PanelFill.bmp \
+	-resource:Resources/DockIndicator.PanelLeft.Active.bmp,WeifenLuo.WinFormsUI.Resources.DockIndicator.PanelLeft.Active.bmp \
+	-resource:Resources/DockIndicator.PanelLeft.bmp,WeifenLuo.WinFormsUI.Resources.DockIndicator.PanelLeft.bmp \
+	-resource:Resources/DockIndicator.PanelRight.Active.bmp,WeifenLuo.WinFormsUI.Resources.DockIndicator.PanelRight.Active.bmp \
+	-resource:Resources/DockIndicator.PanelRight.bmp,WeifenLuo.WinFormsUI.Resources.DockIndicator.PanelRight.bmp \
+	-resource:Resources/DockIndicator.PanelTop.Active.bmp,WeifenLuo.WinFormsUI.Resources.DockIndicator.PanelTop.Active.bmp \
+	-resource:Resources/DockIndicator.PanelTop.bmp,WeifenLuo.WinFormsUI.Resources.DockIndicator.PanelTop.bmp \
+	-resource:Resources/DockPaneCaption.AutoHideNo.bmp,WeifenLuo.WinFormsUI.Resources.DockPaneCaption.AutoHideNo.bmp \
+	-resource:Resources/DockPaneCaption.AutoHideYes.bmp,WeifenLuo.WinFormsUI.Resources.DockPaneCaption.AutoHideYes.bmp \
+	-resource:Resources/DockPaneCaption.CloseDisabled.bmp,WeifenLuo.WinFormsUI.Resources.DockPaneCaption.CloseDisabled.bmp \
+	-resource:Resources/DockPaneCaption.CloseEnabled.bmp,WeifenLuo.WinFormsUI.Resources.DockPaneCaption.CloseEnabled.bmp \
+	-resource:Resources/DockPanel.bmp,WeifenLuo.WinFormsUI.Resources.DockPanel.bmp \
+	-resource:Resources/DockPaneStrip.CloseDisabled.bmp,WeifenLuo.WinFormsUI.Resources.DockPaneStrip.CloseDisabled.bmp \
+	-resource:Resources/DockPaneStrip.CloseEnabled.bmp,WeifenLuo.WinFormsUI.Resources.DockPaneStrip.CloseEnabled.bmp \
+	-resource:Resources/DockPaneStrip.ScrollLeftDisabled.bmp,WeifenLuo.WinFormsUI.Resources.DockPaneStrip.ScrollLeftDisabled.bmp \
+	-resource:Resources/DockPaneStrip.ScrollLeftEnabled.bmp,WeifenLuo.WinFormsUI.Resources.DockPaneStrip.ScrollLeftEnabled.bmp \
+	-resource:Resources/DockPaneStrip.ScrollRightDisabled.bmp,WeifenLuo.WinFormsUI.Resources.DockPaneStrip.ScrollRightDisabled.bmp \
+	-resource:Resources/DockPaneStrip.ScrollRightEnabled.bmp,WeifenLuo.WinFormsUI.Resources.DockPaneStrip.ScrollRightEnabled.bmp \
+	-resource:Resources/MdiClientController.bmp,WeifenLuo.WinFormsUI.Resources.MdiClientController.bmp
+
+all: \
+$(WINFORMSUI_DLL)
+$(WINFORMSUI_DLL): $(WINFORMSUI_SRC) 
+	-mkdir -p $(TARGET)
+	$(RESGEN) /compile Docking/DockPanel.resx Docking/DockWindow.resx 
+	$(MCS) $(MCSFLAGS) $(LIBS) -r:System.dll -r:System.Xml.dll -r:System.Drawing.dll -r:System.Windows.Forms.dll -r:System.Design.dll -r:System.Data.dll -target:library -out:$(WINFORMSUI_DLL) $(WINFORMSUI_RES) $(WINFORMSUI_SRC)
+
+
+# common targets
+
+all:	$(WINFORMSUI_DLL)
+
+clean:
+	-rm -f "$(WINFORMSUI_DLL)" 2> /dev/null
+	-rm -f "$(WINFORMSUI_PDB)" 2> /dev/null
+
+
+# project names as targets
+
+WinFormsUI: $(WINFORMSUI_DLL)
+
_______________________________________________
Mono-winforms-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-winforms-list

Reply via email to