Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-swt-dev] Shell.win32_new() on other platforms?

I have developed a substantial C++ GUI app that runs on both Mac and
Windows. I would like to create a modeless SWT-implemented toolbar and
define the parent to the toolbar's Shell using an existing window created by
my C++ code. I've gotten this working on Windows using Shell.win32_new to
create a Shell wrapping an existing HWND handle to my C++ window. However,
there are two problems that prevent this from being the whole solution:

1) The Shell.win32_new() docs say that an application shouldn't call it.

2) There appears to be no equivalent on other platforms (ie, Mac).

Can I expect this situation to change any time soon? It does seem highly
useful to be able to use an existing, non-SWT window as a parent for a new
Shell. Of course, it is quite unlikely that all Shell methods will work with
all Shell objects created this way. Perhaps it would be better to have a
Shell constructor that takes an existing OS window handle parameter to be
used as the new Shell's parent. This can be an int on Mac and Win, not sure
about other platforms.

If this kind of thing has been discussed before, please give me a pointer.
I'm new to SWT and this is my first post to this list, so please have
patience if I've used bad terminology or posted in the wrong place.

Paul


Back to the top