Develop and Download Open Source Software

Browse CVS Repository

Diff of /gikonavigoeson/gikonavi/ResPopupBrowser.pas

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1.2.2 by h677, Tue May 8 21:27:44 2007 UTC revision 1.1.2.3 by h677, Tue May 8 22:25:45 2007 UTC
# Line 70  begin Line 70  begin
70              TOleControl(FChild).Parent := nil;              TOleControl(FChild).Parent := nil;
71              FChild.NavigateBlank;              FChild.NavigateBlank;
72              FChild.OnEnter := GikoForm.BrowserEnter;              FChild.OnEnter := GikoForm.BrowserEnter;
73                FChild.OnBeforeNavigate2 := GikoForm.BrowserBeforeNavigate2;
74              FChild.OnStatusTextChange := GikoForm.BrowserStatusTextChange;              FChild.OnStatusTextChange := GikoForm.BrowserStatusTextChange;
75              FChild.OnNewWindow2 := GikoForm.BrowserNewWindow2;              FChild.OnNewWindow2 := GikoForm.BrowserNewWindow2;
76              ShowWindow(FChild.Handle, SW_HIDE);              ShowWindow(FChild.Handle, SW_HIDE);
# Line 79  begin Line 80  begin
80          TOleControl(Self).Parent := nil;          TOleControl(Self).Parent := nil;
81          Self.NavigateBlank;          Self.NavigateBlank;
82          Self.OnEnter := GikoForm.BrowserEnter;          Self.OnEnter := GikoForm.BrowserEnter;
83            Self.OnBeforeNavigate2 := GikoForm.BrowserBeforeNavigate2;
84          Self.OnStatusTextChange := GikoForm.BrowserStatusTextChange;          Self.OnStatusTextChange := GikoForm.BrowserStatusTextChange;
85          Self.OnNewWindow2 := GikoForm.BrowserNewWindow2;          Self.OnNewWindow2 := GikoForm.BrowserNewWindow2;
86          Result := Self;          Result := Self;
# Line 100  var Line 102  var
102      doc: Variant;      doc: Variant;
103          ARect: TRect;          ARect: TRect;
104  begin  begin
     Self.Visible := True;  
     ShowWindow(Self.Handle, SW_SHOW);  
105      try      try
106          doc := Idispatch( olevariant(Self.ControlInterface).Document) as IHTMLDocument2;          doc := Idispatch( olevariant(Self.ControlInterface).Document) as IHTMLDocument2;
107          doc.open;          doc.open;
# Line 119  begin Line 119  begin
119          end;          end;
120    
121          ARect := CalcRect(Screen.Width);          ARect := CalcRect(Screen.Width);
122          SetWindowPos(Self.Handle, HWND_TOPMOST,          SetWindowPos(Self.Handle, HWND_TOP,
123              ARect.Left, ARect.Top,              ARect.Left, ARect.Top,
124              (ARect.Right - ARect.Left) ,              (ARect.Right - ARect.Left) ,
125              (ARect.Bottom - ARect.Top),              (ARect.Bottom - ARect.Top),
126              SWP_NOACTIVATE or SWP_HIDEWINDOW);              SWP_NOACTIVATE or SWP_HIDEWINDOW);
127            Self.Visible := True;
128          ShowWindow(Self.Handle, SW_SHOWNOACTIVATE);          ShowWindow(Self.Handle, SW_SHOWNOACTIVATE);
129    
130      except      except
# Line 176  end; Line 176  end;
176  function TResPopupBrowser.CalcRect(MaxWidth: Integer): TRect;  function TResPopupBrowser.CalcRect(MaxWidth: Integer): TRect;
177  var  var
178          p: TPoint;          p: TPoint;
     doc: Variant;  
179      ele: IHTMLElement2;      ele: IHTMLElement2;
180  begin  begin
181          GetCursorpos(p);          GetCursorpos(p);
# Line 185  begin Line 184  begin
184          ele.scrollWidth + 15,          ele.scrollWidth + 15,
185          ele.scrollHeight + 15);          ele.scrollHeight + 15);
186      case GikoSys.Setting.PopupPosition of      case GikoSys.Setting.PopupPosition of
187          gppRightTop:            OffsetRect(Result, p.x - (Result.Right - Result.Left), p.y - (Result.Bottom - Result.Top));          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), p.y - ((Result.Bottom - Result.Top) div 2));          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), p.y);          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));          gppTop:                                 OffsetRect(Result, p.x - ((Result.Right - Result.Left) div 2), p.y - (Result.Bottom - Result.Top) - 2);
191          gppCenter:                      OffsetRect(Result, p.x - ((Result.Right - Result.Left) div 2), p.y - ((Result.Bottom - Result.Top) div 2));          gppCenter:                      OffsetRect(Result, p.x - ((Result.Right - Result.Left) div 2), p.y - ((Result.Bottom - Result.Top) div 2));
192          gppBottom:                      OffsetRect(Result, p.x - ((Result.Right - Result.Left) div 2), p.y);          gppBottom:                      OffsetRect(Result, p.x - ((Result.Right - Result.Left) div 2), p.y + 2);
193          gppLeftTop:                     OffsetRect(Result, p.x, p.y - (Result.Bottom - Result.Top));          gppLeftTop:                     OffsetRect(Result, p.x + 2, p.y - (Result.Bottom - Result.Top) - 2);
194          gppLeft:                                OffsetRect(Result, p.x, p.y - ((Result.Bottom - Result.Top) div 2));          gppLeft:                                OffsetRect(Result, p.x + 2, p.y - ((Result.Bottom - Result.Top) div 2));
195          gppLeftBottom:  OffsetRect(Result, p.x, p.y);          gppLeftBottom:  OffsetRect(Result, p.x + 2, p.y + 2);
196      end;      end;
197      if (Result.Left < 0) then begin      if (Result.Left < 0) then begin
198          OffsetRect(Result, -Result.Left, 0);          OffsetRect(Result, -Result.Left, 0);

Legend:
Removed from v.1.1.2.2  
changed lines
  Added in v.1.1.2.3

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26