Oojni add in net for vs71
Author: s | 2025-04-24
Download OOJNI Add-in .NET for VS7.1 latest version for Windows free to try. OOJNI Add-in .NET for VS7.1 latest update: J
Download OOJNI Add-in .NET for VS7.1
Download demo project - 68.8 Kb Download source - 120 Kb IntroductionAs I am a lazy boy in writing code, I try to develop tools for reducing my efforts in programming. This article is a result of using the last tool developed by me.BackgroundJava Native Interface (JNI) is a set of low level C functions that are very complex to use. A great number of things should be written to support JNI code integrity. Using pure JNI looks like developing OLE modules in MS Visual C++ without using ATL tools and libraries. I have found dozens of products that partially solve this problem, but they all have some serious defects, like:complexity, user should spend a lot of time learning them; unfriendly to use, after generating code, user has to manually modify the project for compiling and execution; huge overhead, many standard modules should be included in the user's code; commercial restrictions, the products are very expensive and assume royalties; huge size of the generated code. By developing the Object-Oriented JNI (OOJNI) SDK, I tried to solve the problems mentioned above. OOJNI completely hides the low level JNI specifics, making C++ programming with JNI simple and comfortable. This SDK preserves the Java style programming in C++.Object-Oriented JNI demo projectBefore you can compile and run the sample project, please make sure that you have properly installed the Java Development Kit (JDK) version 1.3.x or higher on your computer.The code of this application was generated with MS Visual Studio and OOJNI Advanced Add-in for VC 6.0. Java class wrappers were created using the runtime library (rt.jar) of IBM JDK 1.3. To run this code, put the EXE and the OOJNI runtime (OOJNI.DLL) modules in the same directory.The code1. Creating the EmbeddedAWTFrame demoThe application code was generated with the MFC Application Wizard. EmbeddedAWTFrame Demo starts a dialog as the main window.2. Generating C++ code for gluing Java objects to the demoTo use the Java objects from C++ code, I have generated C++ JNI wrappers with OOJNI Advanced Add-in for VC 6.0. Each C++ JNI class wraps specific Java class members that are used in my code (this option is supported by the tool):Java class usedC++ wrapper generatedMembers wrappedjava.awt.ButtonCPP_Java_Bridge::java:: awt::ButtonJNIProxyconstructor:java.awt.Button(); method: void setLabel (java.lang.String s);java.awt.ColorCPP_Java_Bridge::java:: awt::ColorJNIProxyfield:java.awt.Color blue;java.awt.PanelCPP_Java_Bridge::java:: awt::PanelJNIProxyconstuctor:java.awt.Panel();CODE> method:java.awt.Component add(java.awt.Component c); method:void setBackground(java.awt.Color c);javax.swing. SwingUtilitiesCPP_Java_Bridge::javax:: swing::SwingUtilitiesJNIProxymethod:static void invokeLater(java.lang.Runnable r);sun.awt.windows. WEmbeddedFrameCPP_Java_Bridge::sun::awt:: windows::WEmbeddedFrameJNIProxyconstructor:sun.awt.windows. WEmbeddedFrame(int n); method:java.awt.Component add(java.awt.Component c); method:void setBounds(int x, int y, int w, int h); method:void show();Each C++ wrapper does all the routine job hidden from the programmer. Look at the wrapper for the method setLabel from CPP_Java_Bridge::java::awt::ButtonJNIProxy:void CPP_Java_Bridge::java::awt::ButtonJNIProxy:: setLabel(::jni_helpers::JStringHelper p0) { try{ if(setLabel_ID == 0) setLabel_ID = ::jni_helpers::JNIEnvHelper:: GetMethodID(clazz, "setLabel", "(Ljava/lang/String;)V"); ::jni_helpers::JNIEnvHelper::CallVoidMethod(*this, setLabel_ID, (jobject)p0); }catch(::jni_helpers::JVMException e){ throw ::jni_helpers::JVMException(jni_helpers:: CSmartString("CPP_Java_Bridge::java::awt:: ButtonJNIProxy::setLabel:\n") + e.getMessage()); }catch(...){ throw ::jni_helpers::JVMException("CPP_Java_Bridge" "::java::awt::ButtonJNIProxy::" "setLabel: System Error"); } }This code gets the method ID and calls setLabel. It also makes all the C++ - to - Java conversions, and catches Java and C++ exceptions.In the demo code, I also use a callback interface java.lang.Runnable (it has only one method void run()). For
OOJNI Add-in .NET for VS7.1 - Review and Download
This interface, I generated its C++ implementation (with the tool above):namespace CPP_Java_Bridge{ namespace java{ namespace lang{ #ifdef __JNIHDLL class __declspec(dllexport) RunnableJNIImpl: public jni_helpers::JNIInterface{ #elif __USEDLL class __declspec(dllimport) RunnableJNIImpl: public jni_helpers::JNIInterface{ #else class RunnableJNIImpl: public jni_helpers::JNIInterface{ #endif static const JNINativeMethod methods[]; static const jbyte bytes[]; static const char* _clazzName; public: RunnableJNIImpl(); virtual void run(){} }; namespace RunnableJNIImpl_Native{ extern "C" { JNIEXPORT void JNICALL run(JNIEnv *, jobject, jlong); }} }}}The method void run() is virtual, empty, and should be overloaded for use:class Runnable: public CPP_Java_Bridge::java::lang::RunnableJNIImpl { CPP_Java_Bridge::sun::awt:: windows::WEmbeddedFrameJNIProxy& frm; CPP_Java_Bridge::java::awt::ButtonJNIProxy& button1; CPP_Java_Bridge::java::awt::ButtonJNIProxy& button2; CPP_Java_Bridge::java::awt::PanelJNIProxy& panel; CRect rc; public: Runnable(CPP_Java_Bridge::sun::awt:: windows::WEmbeddedFrameJNIProxy& embFrm, CPP_Java_Bridge::java::awt::ButtonJNIProxy& b1, CPP_Java_Bridge::java::awt::ButtonJNIProxy& b2, CPP_Java_Bridge::java::awt::PanelJNIProxy& p): CPP_Java_Bridge::java::lang::RunnableJNIImpl() ,frm(embFrm) ,button1(b1) ,button2(b2) ,panel(p) { } void init(HWND hwnd, CRect& rc) { CPP_Java_Bridge::sun::awt::windows:: WEmbeddedFrameJNIProxy tmp((long)hwnd); frm = JObject_t(tmp); this->rc = rc; } void run(); };3. Put it all togetherThe application starts a dialog as the main window, with Java components embedded in it. To compile the code, I added this line to the EmbeddedAWTFrameDlg.h file:#include "defproxies.h"It includes all the referenced OOJNI headers. For activating the Java engine in the CEmbeddedAWTFrameApp::InitInstance() function, I call jni_helpers::JVM::load(). This method loads the default JVM installed on your computer:BOOL CEmbeddedAWTFrameApp::InitInstance() { AfxEnableControlContainer(); #ifdef _AFXDLL Enable3dControls(); #else Enable3dControlsStatic(); #endif jni_helpers::JVM::load(); CEmbeddedAWTFrameDlg dlg; m_pMainWnd = &dlg int nResponse = dlg.DoModal(); if (nResponse == IDOK) { } else if (nResponse == IDCANCEL) { } return FALSE; }The dialog's constructor creates the Java GUI objects, and constructs the Runnable object with the GUI objects created:CEmbeddedAWTFrameDlg::CEmbeddedAWTFrameDlg(CWnd* pParent ) : CDialog(CEmbeddedAWTFrameDlg::IDD, pParent) ,embFrm((jobject)0) ,run(embFrm, button1, button2, panel) { m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); }On the dialog's WM_SHOWWINDOW event, the Java GUI objects are embedded to the dialog. For demonstrating the usage of the Java callback interface in C++, I do this embedding asynchronously (by calling javax.swing.SwingUtilities.invokeLater with the run object):void CEmbeddedAWTFrameDlg::OnShowWindow(BOOL bShow, UINT nStatus) { CDialog::OnShowWindow(bShow, nStatus); if(IsWindow(m_hWnd)) { CRect rc; CRect rcDlgRc; CRect rcDlgCl; GetWindowRect(&rcDlgRc); GetClientRect(&rcDlgCl); m_oStatic.GetWindowRect(&rc); ScreenToClient(&rc); run.init(m_hWnd, rc); CPP_Java_Bridge::javax::swing:: SwingUtilitiesJNIProxy::invokeLater(run); } }The JVM calls the Runnable::run() function from EventQueue, and here I do the main things:void Runnable::run() { HWND h = (HWND)jni_helpers::JNIEnvHelper:: getNativeFromComponent(frm); ::MoveWindow(h, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, TRUE); button1.setLabel("Java Button1"); button2.setLabel("Java Button2"); panel.add(button1); panel.add(button2); panel.setBackground(CPP_Java_Bridge::java:: awt::ColorJNIProxy::get_blue()); frm.add(panel); frm.show();}This function gets the WEmbeddedFrame object's window handle to resize it, fills the Panel object with two push buttons, sets its background color to blue, and inserts the Panel to the WEmbeddedFrame object, which is shown.Embedding SWING componentsYou can modify the example to embed SWING components into JNI code. But because of a bug in WEmbeddedFrame class SWING components will not respond to key/mouse events. Having been created WEmbeddedFrame object has no LightweightDispatcher associated with it. This dispatcher should redirect events to lightweight components inside the heavyweight container. The dispatcher should be created explicitly in JNI code just after constructing WEmbeddedFrame object. Do this in the function Runnable::init():void init(HWND hwnd, CRect& rc) { CPP_Java_Bridge::sun::awt::windows:: WEmbeddedFrameJNIProxy tmp((long)hwnd); java::awt::ContainerJNIProxy c(tmp); c.dispatcher = java::awt::LightweightDispatcherJNIProxy((java::awt::Container)tmp); frm = JObject_t(tmp); this->rc = rc; }The wrappers java::awt::ContainerJNIProxy and java::awt::LightweightDispatcherJNIProxy are generated with OOJNI Tool for classes java.awt.Container and java.awt.LightweightDispatcher.OtherOOJNI Add-in .NET for VS7.1 for Windows - CNET Download
Use the SQL Anywhere .NET Data Provider to develop .NET applications with Visual Studio by including both a reference to the SQL Anywhere .NET Data Provider, and a line in your source code referencing the SQL Anywhere .NET Data Provider classes. Prerequisites There are no prerequisites for this task. Context and remarks Many. Task Start Visual Studio and open your project. In the Solution Explorer window, right-click References and click Add Reference. The reference indicates which provider to include and locates the code for the SQL Anywhere .NET Data Provider. Click the .NET tab, and scroll through the list to locate any of the following: iAnywhere.Data.SQLAnywhere for .NET 2 iAnywhere.Data.SQLAnywhere for .NET 3.5 iAnywhere.Data.SQLAnywhere for .NET 4 Note There is separate version of the provider for Windows Mobile platforms. For the Windows Mobile SQL Anywhere .NET Data Provider, click the Browse tab and locate the Windows Mobile version of the provider. The default location is %SQLANY12%\CE\Assembly\V2. Click the desired provider and then click OK. The provider is added to the References folder in the Solution Explorer window of your project. Specify a directive to your source code to assist with the use of the SQL Anywhere .NET Data Provider namespace and the defined types. Add the following line to your project: If you are using C#, add the following line to the list of using directives at the beginning of your project: using iAnywhere.Data.SQLAnywhere; If you are using Visual Basic, add the following line at the beginning of your project before the line Public Class Form1: Imports iAnywhere.Data.SQLAnywhere Results The SQL Anywhere .NET Data Provider is set up for use with your .NET application. Example The following example illustrates code that can be used to establish a database connection when a directive is specified: SAConnection conn = new SAConnection(); The following example illustrates code that can be used to establish a database connection when a directive is not specified: iAnywhere.Data.SQLAnywhere.SAConnection conn = new iAnywhere.Data.SQLAnywhere.SAConnection();. Download OOJNI Add-in .NET for VS7.1 latest version for Windows free to try. OOJNI Add-in .NET for VS7.1 latest update: J Comment: The same library for .NET Framework v.1.1 is available at OOJNI Add-in .NET (C)OOJNI Add-in .NET for VS7.1 - Review and Download - Pinterest
Radio Net Digital - Chrome Browser Add-on for Listening to RadioRadio Net Digital is a Chrome browser add-on that allows you to listen to radio stations directly from your Google Chrome browser. With this add-on, you can access a wide range of radio stations and enjoy your favorite music, news, and talk shows without the need for a separate radio device or application.The add-on provides a user-friendly interface that makes it easy to browse and select from the available radio stations. You can search for stations by genre, location, or station name, and save your favorite stations for quick access. The add-on also offers a built-in player with basic controls such as play, pause, and volume adjustment.Radio Net Digital is a free add-on, making it an affordable option for anyone who wants to listen to radio stations while browsing the web. It is a convenient tool for music enthusiasts, news junkies, and anyone who enjoys listening to radio content.Overall, Radio Net Digital is a useful Chrome browser add-on that brings the world of radio directly to your web browser. It offers a wide selection of radio stations and a user-friendly interface, making it easy and enjoyable to listen to your favorite radio content while using Chrome.Also available in other platformsRadio Net Digital for AndroidProgram available in other languages下载Radio Net Digital [ZH]Radio Net Digital indir [TR]ดาวน์โหลด Radio Net Digital [TH]تنزيل Radio Net Digital [AR]ダウンロードRadio Net Digital [JA]Radio Net Digital herunterladen [DE]Tải xuống Radio Net Digital [VI]Pobierz Radio Net Digital [PL]Download Radio Net Digital [NL]Download do Radio Net Digital [PT]Скачать Radio Net Digital [RU]Descargar Radio Net Digital [ES]Scarica Radio Net Digital [IT]Ladda ner Radio Net Digital [SV]Télécharger Radio Net Digital [FR]Radio Net Digital 다운로드 [KO]Unduh Radio Net Digital [ID]Explore MoreLatest articlesLaws concerning the use of this software vary from country to country. We do not encourage or condone the use of this program if it is in violation of these laws.OOJNI Add-in .NET for VS7.1 para Windows - CNET Download
The time has come for Fiddler to say goodbye to .NET 3.5. Our usage statistics currently show that less than 3% of our users are using .NET 3.5, and so we can no longer justify the effort needed to keep all new Fiddler versions running on .NET 3.5. We are still going to keep the most recent (at the time of writing) .NET 3.5 version in the Fiddler installer, and it will be automatically chosen for installation on machines that have no higher version of .NET installed. While you're welcome to keep using it, this version is not going to get updated from this point on. As time passes it is going to get less and less useful, and at some point in the future we will remove it completely. So, to sum up, in order to get updates to Fiddler from now on one should have at least .NET 4.0 installed. .NET 4.0 replaces .NET 3.5 as the minimal supported .NET version for Fiddler. FiddlerCore FiddlerCore will follow suit with Fiddler. The .NET 2.0 and .NET 3.5 builds will remain in the installer but will cease to get updates. The .NET 4.0 framework is going to be the lowest .NET version that will continue to receive FiddlerCore updates. Fiddler Add-ons At present the vast majority of Fiddler add-ons are compiled against .NET 3.5. They will keep on working on the new versions of Fiddler the same way they work on Fiddler for .NET 4.0 now. We will release .NET 4.0 versions of the add-ons that we maintain since it is now safe to do that. All add on creators are welcome to do that, too, and benefit from the features offered by .NET 4.0. In the future we will remove the dependency between the add-ons .NET version and theDownload OOJNI Advanced Add-in for VC6
> Install-Package XDoc.PDF An excellent PDF library allows C# developers to add or delete watermark to PDF File in C#.NET without itextsharp ON THIS PAGE: OverviewWatermark property settingsAdd watermark to PDF Add text watermarkAdd image watermark Add watermark to page header and footerRemove all page watermark settingsExtract all page watermark settings In this C# tutorial, you will learn how to use C# code to add, insert, remove text or image watermarks on PDF pages in your .NET Windows and ASP.NET MVC web applications.Add, insert, remove text, image watermark to PDF pagesApply watermark from another PDFAdd the same watermark to every page of the PDF file, or use different watermarks to specific PDF pagesAdjust the placement, text style, rotate, opacity of watermarks on PDFSupport .NET Core, .NET Framework on ASP.NET, MVC, WinForms application. No need itextsharp.How to add, remove text, image watermarks on PDF pages using C# Download XDoc.PDF watermark C# libraryInstall C# library to insert, read, delete watermark from PDF pagesStep by Step Tutorial Professional PDF SDK for Visual Studio .NET, which able to add watermark in C#.NET classAdvanced PDF edit control and component for modify watermark in both C#.NET WinFormsFree online sample code for quick evaluation in Visual C#.NET framework for PDF watermarkSupport .NET WinForms, ASP.NET MVC in IIS, ASP.NET Ajax, Azure cloud service, DNN (DotNetNuke), SharePointEasy to add/remove watermark to/from PDF page online in browser in ASP.NET web projectSupport to copy a PDF watermark to another PDF file page in .NET frameworkSupport to add different watermark to PDF file.A watermark is text or an image that is displayed either in front of or behind existing PDF document content. For example, you could create and add a "Confidential" text watermark to PDF pages with sensitive information. You can add multiple watermarks to a PDF file, but you must add each watermark separately. You can specify the page or range of pages on which each watermark appears.Watermark property settingsText watermark supports the following property settings:Text message: the text watermark messageText font style: the text font styleText color: the text font colorText alignment: the text watermark alignmentIsAbovePage: the text watermark will be displayed above pdf page content or below the contentRotate: text rotation valueOpacity: the text transparencyPageRangeOptions: list of pages where the watermark will be applied.Image watermark supports the following property settings:Image file resource: the Bitmap object includes watermark image dataIsAbovePage: the image watermark will be displayed above pdf page content or below the contentOpacity: the image transparencyPageRangeOptions: list of pages where the watermark will be applied.C# add watermark to PDF documentThe following content will explain how to add text watermark, and image watermark to pdf document with property settings.Add text watermark to a PDF document object using C#The following C# example source code shows how to add two text watermarks to a PDF document. One watermark is added to each odd pages, and the other watermark is added to each even pages.Create a PDFDocument object from a PDF fileCreate a PDFWatermarkTextRes object with text content, font family, colors specified, which. Download OOJNI Add-in .NET for VS7.1 latest version for Windows free to try. OOJNI Add-in .NET for VS7.1 latest update: JComments
Download demo project - 68.8 Kb Download source - 120 Kb IntroductionAs I am a lazy boy in writing code, I try to develop tools for reducing my efforts in programming. This article is a result of using the last tool developed by me.BackgroundJava Native Interface (JNI) is a set of low level C functions that are very complex to use. A great number of things should be written to support JNI code integrity. Using pure JNI looks like developing OLE modules in MS Visual C++ without using ATL tools and libraries. I have found dozens of products that partially solve this problem, but they all have some serious defects, like:complexity, user should spend a lot of time learning them; unfriendly to use, after generating code, user has to manually modify the project for compiling and execution; huge overhead, many standard modules should be included in the user's code; commercial restrictions, the products are very expensive and assume royalties; huge size of the generated code. By developing the Object-Oriented JNI (OOJNI) SDK, I tried to solve the problems mentioned above. OOJNI completely hides the low level JNI specifics, making C++ programming with JNI simple and comfortable. This SDK preserves the Java style programming in C++.Object-Oriented JNI demo projectBefore you can compile and run the sample project, please make sure that you have properly installed the Java Development Kit (JDK) version 1.3.x or higher on your computer.The code of this application was generated with MS Visual Studio and OOJNI Advanced Add-in for VC 6.0. Java class wrappers were created using the runtime library (rt.jar) of IBM JDK 1.3. To run this code, put the EXE and the OOJNI runtime (OOJNI.DLL) modules in the same directory.The code1. Creating the EmbeddedAWTFrame demoThe application code was generated with the MFC Application Wizard. EmbeddedAWTFrame Demo starts a dialog as the main window.2. Generating C++ code for gluing Java objects to the demoTo use the Java objects from C++ code, I have generated C++ JNI wrappers with OOJNI Advanced Add-in for VC 6.0. Each C++ JNI class wraps specific Java class members that are used in my code (this option is supported by the tool):Java class usedC++ wrapper generatedMembers wrappedjava.awt.ButtonCPP_Java_Bridge::java:: awt::ButtonJNIProxyconstructor:java.awt.Button(); method: void setLabel (java.lang.String s);java.awt.ColorCPP_Java_Bridge::java:: awt::ColorJNIProxyfield:java.awt.Color blue;java.awt.PanelCPP_Java_Bridge::java:: awt::PanelJNIProxyconstuctor:java.awt.Panel();CODE> method:java.awt.Component add(java.awt.Component c); method:void setBackground(java.awt.Color c);javax.swing. SwingUtilitiesCPP_Java_Bridge::javax:: swing::SwingUtilitiesJNIProxymethod:static void invokeLater(java.lang.Runnable r);sun.awt.windows. WEmbeddedFrameCPP_Java_Bridge::sun::awt:: windows::WEmbeddedFrameJNIProxyconstructor:sun.awt.windows. WEmbeddedFrame(int n); method:java.awt.Component add(java.awt.Component c); method:void setBounds(int x, int y, int w, int h); method:void show();Each C++ wrapper does all the routine job hidden from the programmer. Look at the wrapper for the method setLabel from CPP_Java_Bridge::java::awt::ButtonJNIProxy:void CPP_Java_Bridge::java::awt::ButtonJNIProxy:: setLabel(::jni_helpers::JStringHelper p0) { try{ if(setLabel_ID == 0) setLabel_ID = ::jni_helpers::JNIEnvHelper:: GetMethodID(clazz, "setLabel", "(Ljava/lang/String;)V"); ::jni_helpers::JNIEnvHelper::CallVoidMethod(*this, setLabel_ID, (jobject)p0); }catch(::jni_helpers::JVMException e){ throw ::jni_helpers::JVMException(jni_helpers:: CSmartString("CPP_Java_Bridge::java::awt:: ButtonJNIProxy::setLabel:\n") + e.getMessage()); }catch(...){ throw ::jni_helpers::JVMException("CPP_Java_Bridge" "::java::awt::ButtonJNIProxy::" "setLabel: System Error"); } }This code gets the method ID and calls setLabel. It also makes all the C++ - to - Java conversions, and catches Java and C++ exceptions.In the demo code, I also use a callback interface java.lang.Runnable (it has only one method void run()). For
2025-04-13This interface, I generated its C++ implementation (with the tool above):namespace CPP_Java_Bridge{ namespace java{ namespace lang{ #ifdef __JNIHDLL class __declspec(dllexport) RunnableJNIImpl: public jni_helpers::JNIInterface{ #elif __USEDLL class __declspec(dllimport) RunnableJNIImpl: public jni_helpers::JNIInterface{ #else class RunnableJNIImpl: public jni_helpers::JNIInterface{ #endif static const JNINativeMethod methods[]; static const jbyte bytes[]; static const char* _clazzName; public: RunnableJNIImpl(); virtual void run(){} }; namespace RunnableJNIImpl_Native{ extern "C" { JNIEXPORT void JNICALL run(JNIEnv *, jobject, jlong); }} }}}The method void run() is virtual, empty, and should be overloaded for use:class Runnable: public CPP_Java_Bridge::java::lang::RunnableJNIImpl { CPP_Java_Bridge::sun::awt:: windows::WEmbeddedFrameJNIProxy& frm; CPP_Java_Bridge::java::awt::ButtonJNIProxy& button1; CPP_Java_Bridge::java::awt::ButtonJNIProxy& button2; CPP_Java_Bridge::java::awt::PanelJNIProxy& panel; CRect rc; public: Runnable(CPP_Java_Bridge::sun::awt:: windows::WEmbeddedFrameJNIProxy& embFrm, CPP_Java_Bridge::java::awt::ButtonJNIProxy& b1, CPP_Java_Bridge::java::awt::ButtonJNIProxy& b2, CPP_Java_Bridge::java::awt::PanelJNIProxy& p): CPP_Java_Bridge::java::lang::RunnableJNIImpl() ,frm(embFrm) ,button1(b1) ,button2(b2) ,panel(p) { } void init(HWND hwnd, CRect& rc) { CPP_Java_Bridge::sun::awt::windows:: WEmbeddedFrameJNIProxy tmp((long)hwnd); frm = JObject_t(tmp); this->rc = rc; } void run(); };3. Put it all togetherThe application starts a dialog as the main window, with Java components embedded in it. To compile the code, I added this line to the EmbeddedAWTFrameDlg.h file:#include "defproxies.h"It includes all the referenced OOJNI headers. For activating the Java engine in the CEmbeddedAWTFrameApp::InitInstance() function, I call jni_helpers::JVM::load(). This method loads the default JVM installed on your computer:BOOL CEmbeddedAWTFrameApp::InitInstance() { AfxEnableControlContainer(); #ifdef _AFXDLL Enable3dControls(); #else Enable3dControlsStatic(); #endif jni_helpers::JVM::load(); CEmbeddedAWTFrameDlg dlg; m_pMainWnd = &dlg int nResponse = dlg.DoModal(); if (nResponse == IDOK) { } else if (nResponse == IDCANCEL) { } return FALSE; }The dialog's constructor creates the Java GUI objects, and constructs the Runnable object with the GUI objects created:CEmbeddedAWTFrameDlg::CEmbeddedAWTFrameDlg(CWnd* pParent ) : CDialog(CEmbeddedAWTFrameDlg::IDD, pParent) ,embFrm((jobject)0) ,run(embFrm, button1, button2, panel) { m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); }On the dialog's WM_SHOWWINDOW event, the Java GUI objects are embedded to the dialog. For demonstrating the usage of the Java callback interface in C++, I do this embedding asynchronously (by calling javax.swing.SwingUtilities.invokeLater with the run object):void CEmbeddedAWTFrameDlg::OnShowWindow(BOOL bShow, UINT nStatus) { CDialog::OnShowWindow(bShow, nStatus); if(IsWindow(m_hWnd)) { CRect rc; CRect rcDlgRc; CRect rcDlgCl; GetWindowRect(&rcDlgRc); GetClientRect(&rcDlgCl); m_oStatic.GetWindowRect(&rc); ScreenToClient(&rc); run.init(m_hWnd, rc); CPP_Java_Bridge::javax::swing:: SwingUtilitiesJNIProxy::invokeLater(run); } }The JVM calls the Runnable::run() function from EventQueue, and here I do the main things:void Runnable::run() { HWND h = (HWND)jni_helpers::JNIEnvHelper:: getNativeFromComponent(frm); ::MoveWindow(h, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, TRUE); button1.setLabel("Java Button1"); button2.setLabel("Java Button2"); panel.add(button1); panel.add(button2); panel.setBackground(CPP_Java_Bridge::java:: awt::ColorJNIProxy::get_blue()); frm.add(panel); frm.show();}This function gets the WEmbeddedFrame object's window handle to resize it, fills the Panel object with two push buttons, sets its background color to blue, and inserts the Panel to the WEmbeddedFrame object, which is shown.Embedding SWING componentsYou can modify the example to embed SWING components into JNI code. But because of a bug in WEmbeddedFrame class SWING components will not respond to key/mouse events. Having been created WEmbeddedFrame object has no LightweightDispatcher associated with it. This dispatcher should redirect events to lightweight components inside the heavyweight container. The dispatcher should be created explicitly in JNI code just after constructing WEmbeddedFrame object. Do this in the function Runnable::init():void init(HWND hwnd, CRect& rc) { CPP_Java_Bridge::sun::awt::windows:: WEmbeddedFrameJNIProxy tmp((long)hwnd); java::awt::ContainerJNIProxy c(tmp); c.dispatcher = java::awt::LightweightDispatcherJNIProxy((java::awt::Container)tmp); frm = JObject_t(tmp); this->rc = rc; }The wrappers java::awt::ContainerJNIProxy and java::awt::LightweightDispatcherJNIProxy are generated with OOJNI Tool for classes java.awt.Container and java.awt.LightweightDispatcher.Other
2025-04-12Radio Net Digital - Chrome Browser Add-on for Listening to RadioRadio Net Digital is a Chrome browser add-on that allows you to listen to radio stations directly from your Google Chrome browser. With this add-on, you can access a wide range of radio stations and enjoy your favorite music, news, and talk shows without the need for a separate radio device or application.The add-on provides a user-friendly interface that makes it easy to browse and select from the available radio stations. You can search for stations by genre, location, or station name, and save your favorite stations for quick access. The add-on also offers a built-in player with basic controls such as play, pause, and volume adjustment.Radio Net Digital is a free add-on, making it an affordable option for anyone who wants to listen to radio stations while browsing the web. It is a convenient tool for music enthusiasts, news junkies, and anyone who enjoys listening to radio content.Overall, Radio Net Digital is a useful Chrome browser add-on that brings the world of radio directly to your web browser. It offers a wide selection of radio stations and a user-friendly interface, making it easy and enjoyable to listen to your favorite radio content while using Chrome.Also available in other platformsRadio Net Digital for AndroidProgram available in other languages下载Radio Net Digital [ZH]Radio Net Digital indir [TR]ดาวน์โหลด Radio Net Digital [TH]تنزيل Radio Net Digital [AR]ダウンロードRadio Net Digital [JA]Radio Net Digital herunterladen [DE]Tải xuống Radio Net Digital [VI]Pobierz Radio Net Digital [PL]Download Radio Net Digital [NL]Download do Radio Net Digital [PT]Скачать Radio Net Digital [RU]Descargar Radio Net Digital [ES]Scarica Radio Net Digital [IT]Ladda ner Radio Net Digital [SV]Télécharger Radio Net Digital [FR]Radio Net Digital 다운로드 [KO]Unduh Radio Net Digital [ID]Explore MoreLatest articlesLaws concerning the use of this software vary from country to country. We do not encourage or condone the use of this program if it is in violation of these laws.
2025-04-08