That's part of the Windows API.GTK is a cross-platform toolkit and does not include any platform specific code as you suggest. GDK however has some low level functions for each of the backends it supports, which is fortunate because windows doesn't believe in the existance of other OS's. You'll probably find a function call within this library, the exact function varies depending on yourversion of gdk and I've only seen examples for old versions.However, the fact that you want such a function means its likely your going the wrong way about doing the coding. When using a cross-platform toolkit it is best to operate entirely within the margins of this environment (and as gtk is all encompassing enough in the various libraries available in the stack -- ATK, glib, cairo, pango, GIO, etc. -- this is really not that hard). If, on the other hand, you really really need a hWnd for whatever reason that may be then please make sure you code portably (otherwise you are wasting a lot of the advantage of using GTK in the first place). This means, e.g., having conditional compilation of your code where for every win32 backend specific portion there is also a corresponding non-win32 portion.

Perhaps I should have been more specific: I am coding a VST plugin in which I want to write a GUI for my audio effect. Part of the process is overriding a method called

Code:

open(void *ptr)

where

Code:

ptr

is platform-specific (HWND on windows; I-forget-what on Mac) (needless to say, this method is responsible for opening the plugin's GUI). For the time being, I am only interested in compiling my plugin on Windows, but I wanted to develop the application with cross-platform-ness in mind for the future. It seems unfortunate to me that the VST api is limiting in this way, but hey, who am I to complain (I agree with you that this seems like the wrong way of going about this).

wxWidgets has some platform-specific methods for reassigning an HWND to a wx::Frame, but that didn't seem to work to well when I tried it-- and I didn't try too hard because I prefer GTK if I can use it.

I know you can get a hWnd from a Gdk Window if you include gdkwin32.h and use the GDK_WINDOW_HWND cast but as for going the other direction, I don't really see anything. Probably because GDK running on windows operates as a subset such that every gdk window can be given a hWnd but not every windows window is within the domain of gdk to be given a gdk window.Might be better if someone with windows experience is able to jump in .

Well, thanks for the pointers so far. I agree with you that this is an awkward way to program and what I'm leaning toward is just using VSTGUI for the first window (as much as I hate it), and gtk/wxwindows for any popups (if any) that I want...what bugs me about that is I'm not certain VSTGUI supports linux, but then again, linux isn't one of the major players for VST plugins (yet!)...

Who is online

Users browsing this forum: No registered users and 2 guests

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum