Beispiel #1
0
		/// <summary>
		/// Creates the Sciter window and returns the native handle
		/// </summary>
		/// <param name="frame">Rectangle of the window</param>
		/// <param name="creationFlags">Flags for the window creation, defaults to SW_MAIN | SW_TITLEBAR | SW_RESIZEABLE | SW_CONTROLS | SW_ENABLE_DEBUG</param>
		public void CreateWindow(PInvokeUtils.RECT frame = new PInvokeUtils.RECT(), SciterXDef.SCITER_CREATE_WINDOW_FLAGS creationFlags = DefaultCreateFlags, IntPtr parent = new IntPtr())
		{
			Debug.Assert(_hwnd == IntPtr.Zero);
			_hwnd = _api.SciterCreateWindow(
				creationFlags,
				ref frame,
				_proc,
				IntPtr.Zero,
				parent
			);
			Debug.Assert(_hwnd != IntPtr.Zero);

			if(_hwnd == IntPtr.Zero)
				throw new Exception("CreateWindow() failed");

#if GTKMONO
			_gtkwindow = PInvokeGTK.gtk_widget_get_toplevel(_hwnd);
			Debug.Assert(_gtkwindow != IntPtr.Zero);
#elif OSX
			_nsview = new OSXView(_hwnd);
#endif
		}
 public static extern bool GetClientRect(IntPtr hWnd, out PInvokeUtils.RECT lpRect);
 public static extern bool GetWindowRect(IntPtr hwnd, out PInvokeUtils.RECT lpRect);
 public void Refresh(PInvokeUtils.RECT rc)
 {
     _api.SciterRefreshElementArea(_he, rc);
 }