[Mono-bugs] [Bug 80817][Nor] New - Cannot Create NativeWindow - "Failed to create window, class "

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Mon Feb 12 22:52:39 EST 2007


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by tbarela at deviantmachine.com.

http://bugzilla.ximian.com/show_bug.cgi?id=80817

--- shadow/80817	2007-02-12 22:52:39.000000000 -0500
+++ shadow/80817.tmp.17161	2007-02-12 22:52:39.000000000 -0500
@@ -0,0 +1,69 @@
+Bug#: 80817
+Product: Mono: Class Libraries
+Version: 1.2
+OS: Windows XP
+OS Details: windows 2000
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Windows.Forms
+AssignedTo: toshok at ximian.com                            
+ReportedBy: tbarela at deviantmachine.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Cannot Create NativeWindow - "Failed to create window, class "
+
+Description of Problem:
+
+I am unable to create a window using the NativeWindow class( I have 
+specific reasons to avoid using Form for this case ). My code runs under 
+windows 2000 and .NET 2.0 perfectly. It will not run under mono 1.2x( on 
+win2000 ).
+
+It produces a messagebox saying "Failed to create window, class " Error:0
+
+Steps to reproduce the problem:
+
+//test code... all p/invokes and constants are correct, and defined 
+//elsewhere in the class... 
+public static void Main()
+	{
+		NativeWindow nw = new NativeWindow();
+		
+		CreateParams cp = new CreateParams();
+				
+		cp.Caption = "MyApp";
+		cp.Width = 640;
+		cp.Height = 480;
+		cp.ClassStyle = (int)(CS_VREDRAW | CS_HREDRAW);
+		cp.Style = (int)(WS_OVERLAPPEDWINDOW);
+
+		// create the window.
+		nw.CreateHandle( cp );
+		ShowWindow (nw.Handle, SW_SHOWNORMAL);
+		
+		MSG msg = new MSG();
+
+		while( GetMessageA( ref msg, 0, 0, 0 ) != 0 )
+		{
+			TranslateMessage( ref msg );
+			DispatchMessageA( ref msg );
+		}
+	} 
+
+Actual Results:
+Runs as expected through .NET 2.0.
+Mono produces a messagebox saying "Failed to create window, class " Error:0
+
+Expected Results:
+A Native Win32 window.
+
+
+How often does this happen?
+everytime using mono. 
+
+
+Additional Information:


More information about the mono-bugs mailing list