Articles   Members Online:
-Article/Tip Search
-News Group Search over 21 Million news group articles.
-Delphi/Pascal
-CBuilder/C++
-C#Builder/C#
-JBuilder/Java
-Kylix
Member Area
-Home
-Account Center
-Top 10 NEW!!
-Submit Article/Tip
-Forums Upgraded!!
-My Articles
-Edit Information
-Login/Logout
-Become a Member
-Why sign up!
-Newsletter
-Chat Online!
-Indexes NEW!!
Employment
-Build your resume
-Find a job
-Post a job
-Resume Search
Contacts
-Contacts
-Feedbacks
-Link to us
-Privacy/Disclaimer
Embarcadero
Visit Embarcadero
Embarcadero Community
JEDI
Links
How to fix the incorrect painting of an ActiveX control, which occurs when a web Turn on/off line numbers in source code. Switch to Orginial background IDE or DSP color Comment or reply to this aritlce/tip for discussion. Bookmark this article to my favorite article(s). Print this article
30-Aug-02
Category
ActiveX
Language
Delphi 5.x
Views
148
User Rating
No Votes
# Votes
0
Replies
0
Publisher:
DSP, Administrator
Reference URL:
DKB
			Author: Tomas Rutkauskas

How to fix the incorrect painting of an ActiveX control, which occurs when a web 
page is scrolled

Answer:

In Delphi 4, when an ActiveForm is larger than the browser window the control is on 
top of IE's scroll bars. In Delphi 5 they changed the code to fix this but didn't 
get it quite right resulting in the painting problem when scrolling. You need to 
edit the Delphi 5 AxCtrls unit as follows:


1   function TActiveXControl.SetObjectRects(const rcPosRect: TRect;
2     const rcClipRect: TRect): HResult;
3   var
4     WinRect: TRect;
5   begin
6     try
7       IntersectRect(WinRect, rcPosRect, rcClipRect);
8       {BEGIN FIX}
9       WinRect := Bounds(rcPosRect.left, rcPosRect.Top, WinRect.Right - WinRect.Left +
10        rcClipRect.Left - rcPosRect.Left, WinRect.Bottom - WinRect.Top +
11        rcClipRect.Top - rcPosRect.Top);
12      {END FIX}
13      FWinControl.BoundsRect := WinRect;
14      Result := S_OK;
15    except
16      Result := HandleException;
17    end;
18  end;


			
Vote: How useful do you find this Article/Tip?
Bad Excellent
1 2 3 4 5 6 7 8 9 10

 

Advertisement
Share this page
Advertisement
Download from Google

Copyright © Mendozi Enterprises LLC