dcsimg
How to get the window handle under the Microsoft JVM?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Sean_Lin
Posted On:   Thursday, June 28, 2001 11:23 PM

As previous articles mentioned, using the AWT NI can get the window handle of a canvas. However, the Java application/applet is always subject to the Sun JVM.

I wonder how to get the window handle under the Microsoft JVM. Help me please. Thanks in advance!

Thanks in advance.

Regards,

Sean

Re: How to get the window handle under the Microsoft JVM?

Posted By:   Davanum_Srinivas  
Posted On:   Saturday, June 30, 2001 06:18 AM


import java.awt.*;
import java.awt.peer.*;
import com.ms.awt.peer.*;

class DrawingCanvas extends java.awt.Canvas
{

void viewZoomBy(double Factor)
{
....
ComponentPeer p = this.getPeer();
if( p != null )
{
ComponentPeerX peer1 = (ComponentPeerX)p;
CompHwnd = peer1.gethwnd(); // Microsoft specific method
}
....
}
}
About | Sitemap | Contact