Hi,
I've been staring at traces all day trying to figure this one out, and haven't got very far, so I'm wondering if you guys have any advice. I have an application which embeds an IE web browser control into a window, and then proceeds to draw over it, which should be clipped. The reason it draws over it, is because this is a Java Swing app and there are wierd interactions between "lightweight" and "heavyweight" components (whether they have Win32 windows or not).
In fact, I'm doubly confused, because during execution I can see calls to PatBlt, BitBlt and StretchBlt, but if I disable that code by putting a return true; at the top of X11DRV_InternalStretchBlt, which they all call, nothing changes! The app looks exactly the same, minus the WebBrowser control. So clearly Java does not use the *Blt family of functions, but I can't see any other calls that leap out at me as to what it might use.
So anyway, I've got a few questions:
1) What else could Java be using to draw, if not the blitter functions? 2) Is there some crucial part of GDI clipping that isn't implemented which might be causing this problem? 3) Is it normal that the parent window of an ActiveX embedder can draw over its children in this way? I'd have thought the GDI would have clipped it.
I think I'm going to experiment with a standard Win32/Delphi app and drawing over an ActiveX control, to see what happens.
thanks -mike
Hi Mike,
It could be a z-order issue. If you want, I'll have a look if you send me a sample app or point me to a download link.
/Ulrich
On Mon, 2003-05-12 at 12:04, Mike Hearn wrote:
Hi,
I've been staring at traces all day trying to figure this one out, and haven't got very far, so I'm wondering if you guys have any advice. I have an application which embeds an IE web browser control into a window, and then proceeds to draw over it, which should be clipped. The reason it draws over it, is because this is a Java Swing app and there are wierd interactions between "lightweight" and "heavyweight" components (whether they have Win32 windows or not).
In fact, I'm doubly confused, because during execution I can see calls to PatBlt, BitBlt and StretchBlt, but if I disable that code by putting a return true; at the top of X11DRV_InternalStretchBlt, which they all call, nothing changes! The app looks exactly the same, minus the WebBrowser control. So clearly Java does not use the *Blt family of functions, but I can't see any other calls that leap out at me as to what it might use.
So anyway, I've got a few questions:
- What else could Java be using to draw, if not the blitter functions?
- Is there some crucial part of GDI clipping that isn't implemented
which might be causing this problem? 3) Is it normal that the parent window of an ActiveX embedder can draw over its children in this way? I'd have thought the GDI would have clipped it.
I think I'm going to experiment with a standard Win32/Delphi app and drawing over an ActiveX control, to see what happens.
thanks -mike
On Mon, 2003-05-12 at 19:03, Ulrich Czekalla wrote:
Hi Mike,
It could be a z-order issue. If you want, I'll have a look if you send me a sample app or point me to a download link.
Hmm, the only way I can think of sending you this test case would be to send a complete fake windows directory :( Basically, what you'd need to do in order is this:
1) Install IE (i use v6)
2) Install Java 1.4.1 SDK from java.sun.com (to c:\java to make things easy)
3) Download and install Neva Coroutine (30 day trial) from www.nevaobject.com
4) Copy corojdk.dll from the Coroutine/ directory to fake windows system, and the Coroutine4Java.jar file to c:\java\jre\lib
5) Apply the attached patch in the Java2COM/Examples directory (the last section may not be needed). This ports the example to Swing.
6) The bootstrap script I've been using is also attached (to be put into the Examples/WebBrowser directory) which will compile then run the program.
I'll completely understand if you'd rather skip this one :|
Anyway, perhaps you could elaborate on what exact z-ordering problems there might be? Are there any good docs on how this should work around? I'll go have a look at MSDN now....
thanks -mike
D'oh, I forgot to mention - this test case only demonstrates the bad clipping when you switch virtual desktops for some reason. My actual app suffers when you switch apps using alt-tab as well. I suspect it's affected by system speed etc, so it might not be dupable at all :(
On Fri, 2003-05-16 at 11:41, Mike Hearn wrote:
On Mon, 2003-05-12 at 19:03, Ulrich Czekalla wrote:
Hi Mike,
It could be a z-order issue. If you want, I'll have a look if you send me a sample app or point me to a download link.
Hmm, the only way I can think of sending you this test case would be to send a complete fake windows directory :( Basically, what you'd need to do in order is this:
Install IE (i use v6)
Install Java 1.4.1 SDK from java.sun.com (to c:\java to make things
easy)
- Download and install Neva Coroutine (30 day trial) from
www.nevaobject.com
- Copy corojdk.dll from the Coroutine/ directory to fake windows
system, and the Coroutine4Java.jar file to c:\java\jre\lib
- Apply the attached patch in the Java2COM/Examples directory (the last
section may not be needed). This ports the example to Swing.
- The bootstrap script I've been using is also attached (to be put into
the Examples/WebBrowser directory) which will compile then run the program.
I'll completely understand if you'd rather skip this one :|
Anyway, perhaps you could elaborate on what exact z-ordering problems there might be? Are there any good docs on how this should work around? I'll go have a look at MSDN now....
thanks -mike