Hi all,

I hope, somebody can help me with this:

I have a Qt application which should be integrated into a Win32 application as a plugin. I just have to export a window handle and set some callbacks. Seems easy.
What I do is:

Qt Code:
  1. Application app(argc, argv);
  2. MainWdg* widget = new MainWdg();
  3. widget->show();
  4.  
  5. QWidget* wdg = app.activeWindow();
  6. QMyThread* t = new QMyThread(wdg);
  7. t->moveToThread(t);
  8. t->start();
  9. QObject::connect(t, SIGNAL(finished()), &app, SLOT(quit()) );
To copy to clipboard, switch view to plain text mode 

and in run()

Qt Code:
  1. QMyThread::run() {
  2. HANDLE hwnd=wdg->winId();
  3. //inform Server to embed the console in its panel
  4. ExportWindowHandle(hwnd);
  5. exec();
  6. }
To copy to clipboard, switch view to plain text mode 

The ExportWindowHandle function just does SetParent with the hwnd and reparents my window with the frame window in the "server app".

What happens is: the window is nicely integrated into the server app, but I am not able to use the buttons with the mouse. I have drop-down lists in my window, which I can drop down by the mouse, but the lists appear at a different position. I, however, can use keyboard shortcuts and I can set a focus to a button with the mouse and then press space.
What's going wrong here? Do I miss something?

Thanks in advance for any clue...

Rainer