public ChromeHost(FlyDialog p_Parent) { m_Parent = p_Parent; IntPtr h_Child; h_Child = FindWindowExA(m_Parent.Handle, IntPtr.Zero, "TChromium", string.Empty); h_Child = FindWindowExA(h_Child, IntPtr.Zero, "CefBrowserWindow", string.Empty); m_hHostView = FindWindowExA(h_Child, IntPtr.Zero, "WebViewHost", string.Empty); if (IsWindow(m_hHostView)) { this.AssignHandle(m_hHostView); } }
/// <summary> /// 實例化對象 /// </summary> /// <param name="p_Parent"></param> public FlyDialog(FlyDialog p_Parent = null) { try { this.m_Text = ""; this.m_Content = ""; this.m_Cinfo = new CreateInfo { width = 600, height = 400, min_width = 200, min_height = 100, hicon = IntPtr.Zero, border_style = CefBorderStyle.bsSizeable }; this.m_MouseDragRects = new List <MouseDragRect>(); } catch (Exception ex) { MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }