ギコナビ
Revision | 0b1a69bc85e758a26f33974cc2e1af770aa85076 (tree) |
---|---|
Time | 2007-05-09 07:25:45 |
Author | h677 <h677> |
Commiter | h677 |
NewBrowserイベントが発生しない不具合対応
@@ -70,6 +70,7 @@ begin | ||
70 | 70 | TOleControl(FChild).Parent := nil; |
71 | 71 | FChild.NavigateBlank; |
72 | 72 | FChild.OnEnter := GikoForm.BrowserEnter; |
73 | + FChild.OnBeforeNavigate2 := GikoForm.BrowserBeforeNavigate2; | |
73 | 74 | FChild.OnStatusTextChange := GikoForm.BrowserStatusTextChange; |
74 | 75 | FChild.OnNewWindow2 := GikoForm.BrowserNewWindow2; |
75 | 76 | ShowWindow(FChild.Handle, SW_HIDE); |
@@ -79,6 +80,7 @@ begin | ||
79 | 80 | TOleControl(Self).Parent := nil; |
80 | 81 | Self.NavigateBlank; |
81 | 82 | Self.OnEnter := GikoForm.BrowserEnter; |
83 | + Self.OnBeforeNavigate2 := GikoForm.BrowserBeforeNavigate2; | |
82 | 84 | Self.OnStatusTextChange := GikoForm.BrowserStatusTextChange; |
83 | 85 | Self.OnNewWindow2 := GikoForm.BrowserNewWindow2; |
84 | 86 | Result := Self; |
@@ -100,8 +102,6 @@ var | ||
100 | 102 | doc: Variant; |
101 | 103 | ARect: TRect; |
102 | 104 | begin |
103 | - Self.Visible := True; | |
104 | - ShowWindow(Self.Handle, SW_SHOW); | |
105 | 105 | try |
106 | 106 | doc := Idispatch( olevariant(Self.ControlInterface).Document) as IHTMLDocument2; |
107 | 107 | doc.open; |
@@ -119,12 +119,12 @@ begin | ||
119 | 119 | end; |
120 | 120 | |
121 | 121 | ARect := CalcRect(Screen.Width); |
122 | - SetWindowPos(Self.Handle, HWND_TOPMOST, | |
122 | + SetWindowPos(Self.Handle, HWND_TOP, | |
123 | 123 | ARect.Left, ARect.Top, |
124 | 124 | (ARect.Right - ARect.Left) , |
125 | 125 | (ARect.Bottom - ARect.Top), |
126 | 126 | SWP_NOACTIVATE or SWP_HIDEWINDOW); |
127 | - | |
127 | + Self.Visible := True; | |
128 | 128 | ShowWindow(Self.Handle, SW_SHOWNOACTIVATE); |
129 | 129 | |
130 | 130 | except |
@@ -176,7 +176,6 @@ end; | ||
176 | 176 | function TResPopupBrowser.CalcRect(MaxWidth: Integer): TRect; |
177 | 177 | var |
178 | 178 | p: TPoint; |
179 | - doc: Variant; | |
180 | 179 | ele: IHTMLElement2; |
181 | 180 | begin |
182 | 181 | GetCursorpos(p); |
@@ -185,15 +184,15 @@ begin | ||
185 | 184 | ele.scrollWidth + 15, |
186 | 185 | ele.scrollHeight + 15); |
187 | 186 | case GikoSys.Setting.PopupPosition of |
188 | - gppRightTop: OffsetRect(Result, p.x - (Result.Right - Result.Left), p.y - (Result.Bottom - Result.Top)); | |
189 | - gppRight: OffsetRect(Result, p.x - (Result.Right - Result.Left), p.y - ((Result.Bottom - Result.Top) div 2)); | |
190 | - gppRightBottom: OffsetRect(Result, p.x - (Result.Right - Result.Left), p.y); | |
191 | - gppTop: OffsetRect(Result, p.x - ((Result.Right - Result.Left) div 2), p.y - (Result.Bottom - Result.Top)); | |
187 | + gppRightTop: OffsetRect(Result, p.x - (Result.Right - Result.Left) - 2, p.y - (Result.Bottom - Result.Top) - 2); | |
188 | + gppRight: OffsetRect(Result, p.x - (Result.Right - Result.Left) - 2, p.y - ((Result.Bottom - Result.Top) div 2)); | |
189 | + gppRightBottom: OffsetRect(Result, p.x - (Result.Right - Result.Left) -2, p.y + 2); | |
190 | + gppTop: OffsetRect(Result, p.x - ((Result.Right - Result.Left) div 2), p.y - (Result.Bottom - Result.Top) - 2); | |
192 | 191 | gppCenter: OffsetRect(Result, p.x - ((Result.Right - Result.Left) div 2), p.y - ((Result.Bottom - Result.Top) div 2)); |
193 | - gppBottom: OffsetRect(Result, p.x - ((Result.Right - Result.Left) div 2), p.y); | |
194 | - gppLeftTop: OffsetRect(Result, p.x, p.y - (Result.Bottom - Result.Top)); | |
195 | - gppLeft: OffsetRect(Result, p.x, p.y - ((Result.Bottom - Result.Top) div 2)); | |
196 | - gppLeftBottom: OffsetRect(Result, p.x, p.y); | |
192 | + gppBottom: OffsetRect(Result, p.x - ((Result.Right - Result.Left) div 2), p.y + 2); | |
193 | + gppLeftTop: OffsetRect(Result, p.x + 2, p.y - (Result.Bottom - Result.Top) - 2); | |
194 | + gppLeft: OffsetRect(Result, p.x + 2, p.y - ((Result.Bottom - Result.Top) div 2)); | |
195 | + gppLeftBottom: OffsetRect(Result, p.x + 2, p.y + 2); | |
197 | 196 | end; |
198 | 197 | if (Result.Left < 0) then begin |
199 | 198 | OffsetRect(Result, -Result.Left, 0); |