Setup AWT, Swing project to Web with error for Native.Native.getCompotnentPointer(panelRealplay)

34 views
Skip to first unread message

Zhai Ada

unread,
Jul 12, 2018, 9:10:06 PM7/12/18
to AjaxSwing Community Support

I want to transfer a C/S project for display video from camera, It runs 

Panel  panelRealplay;                                                                                       //this is display video panel
HWND hwnd = new HWND(Native.getComponentPointer(panelRealplay));   //this is use Native to get window from system
m_strClientInfo.hPlayWnd = hwnd;                                                                  //this is SDK from camera plant
hCNetSDK.NET_DVR_RealPlay_V30(lUserID,m_strClientInfo, null, null, false); //call SDK display function

It works well when run project in Eclipse, but it can't get HWND (it returns native@0x0) when I add my jar in AjaxSwing wcapps/libs, and I have also add all dll files and other third party jar file to libs

Native.getComponentPointer uses getWindowHandle0 static long getWindowHandle0(Component c)
when I use  Native.getCompotnentPointer(panelRealplay), it calls getWhindowHandle0,
it returns like '0xd0a2c' in Eclipse, but return '0x0' when I setup my jar in AjaxSwing.






Server OS: <Windows>
AjaxSwing version: <4.51>
JDK version: <1.8.0_171>

Michael Tomara

unread,
Jul 23, 2018, 7:08:22 AM7/23/18
to AjaxSwing Community Support
Hi Ada,
 
Thanks for your question! It can be a problem with configuration - you should add all jars in your project to classpath. Looks like Eclipse imported them correctly. Detailed information about this can be found here http://creamtec.com/products/ajaxswing/doc/setup.html.

Also, we can help you with configuration if you buy our Professional Services.
Reply all
Reply to author
Forward
0 new messages