Re: using gdk_win32_window_foreign_new_for_display

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey Paul,

I already have a standalone version of the synth. Adding VST support isnt that important for me, I was just curious whether it could be done. As it seems, its more complicated than expected.

Am 12.01.2017 um 20:26 schrieb Paul Davis:

I STRONGLY, STRONGLY recommend that you do NOT use GTK or any other desktop GUI toolkit for an audio plugin UI.

It is extremely problematic. Doing so on Windows is likely to cause even more problems than it does on Linux.

Please don't do it.

Mea culpa: I don't have a clearly better suggestion for you.

On Thu, Jan 12, 2017 at 3:20 PM, Tilman K. <tkoss@xxxxxxxxxxxxxx> wrote:
Hey guys,

I would like to develop the GUI for a VST synth with gtk. I need to embed a gtk gui inside a win32 HWND parent window. I think "gdk_win32_window_foreign_new_for_display" could be the right function to create a GdkWindow that is embedded inside the native window. is this correct?

I tried to create a GUI thread this way:

std::thread guiThread([=]{
        auto app = Gtk::Application::create("test");
        auto settings = Gtk::Settings::get_default();
settings->set_property<Glib::ustring>("gtk-font-name","Sans 10");

        Gtk::Window window;
        window.set_default_size(400,400);
        auto disp = Gdk::Display::get_default();
        auto gdkWindow = Glib::wrap(gdk_win32_window_foreign_new_for_display(disp->gobj(),(HWND)systemWindow));
        window.set_parent_window(gdkWindow);

        initApp(&window); //creating widgets
        window.show_all();
        app->run(window);
});
guiThread.detach();

"systemWindow" is a HWND given by the VST host (in my case FLStudio). Unfortunately, the window remains black, no gui drawn. I would be greatful for suggestions

Greetings

Tilman
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
https://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux