Results 1 to 3 of 3
  1. #1
    Settler is offline Member
    Join Date
    Aug 2011
    Posts
    2
    Rep Power
    0

    Default Adding custom controls in a C/C++ DLL

    Hello,

    I'm using a C++ dll via JNI in a AWT application to create a custom control of C DLL with the help of the Win32 API (in Windows XP 32Bit). I.e. in the C/C++ dll I get a window handle and the appropriate control is created with "CreateWindow". Now the Java application calls this function to append the control to the main frame.

    This procedure is working for various kinds of programs like C/C++, C#, Visual Basic and even SWT Java programs! However, when using AWT the whole application freezes without any error message when I try to move the main frame, try to resize or try to interact with the icon.

    I also tried to disable some things in the C/C++ dll and it works so far when I don't call the CreateWindow function in order to create the control. But even when I let the callback procedure for this control empty the freezes continue. So I believe the AWT Windows implementation doesn't bear any "external" controls attached to their AWT windows. Is this correct or does anyone know any tricks?

    Thanks,
    Settler

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,423
    Rep Power
    20

    Default

    You're probably freezing the EDT.

    db

  3. #3
    Settler is offline Member
    Join Date
    Aug 2011
    Posts
    2
    Rep Power
    0

    Default

    And why shall this happen?
    I don't create an extra thread or something else for the handling of "my" control so I don't unterstand what's the problem with AWT.

Similar Threads

  1. Adding custom Jtable to GUI in nested class
    By smallmos1 in forum New To Java
    Replies: 1
    Last Post: 03-16-2011, 12:55 PM
  2. Replies: 0
    Last Post: 12-17-2007, 09:46 AM
  3. Adding custom highlight to JEditorPane
    By andrewb in forum AWT / Swing
    Replies: 0
    Last Post: 06-22-2007, 06:48 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •