getting a (valid) HWND from a Gtk::Window
- From: nimnimnim <nimnimnim gmail com>
- To: gtkmm-list gnome org
- Subject: getting a (valid) HWND from a Gtk::Window
- Date: Mon, 17 Jan 2011 07:54:13 -0800 (PST)
Hello I've found less than a handful of threads on this issue on the entire
web. Perhaps this time this question will receive an answer from a win32
gtkmm dev? I hope so :-)
The question is how to get a valid HWND handle from a Gtk::Window.
I've tried using code I found elsewhere:
// Retrieve GdkWindow part of myWin.
GdkWindow* gdkWinPtr = my_gtk_window.get_window()->gobj();
// Retrieve Win32 application instance handle and window handle.
HWND hWnd = static_cast<HWND>(GDK_WINDOW_HWND(gdkWinPtr));
which compiles fine but when I pass the hWnd object to a recepient making
use of it (in this case the cross-platform Object-oriented Input System OIS)
it throws an invalid HWND exception.
the only member of the hWnd variable is unused with value 0.
it seems the guy who came up with that piece of code had little luck aswell:
Is there a way to get a valid HWND handle from gtk+/gtkmm?
Thank you kindly
View this message in context: http://old.nabble.com/getting-a-%28valid%29-HWND-from-a-Gtk%3A%3AWindow-tp30676211p30676211.html
Sent from the Gtkmm mailing list archive at Nabble.com.
] [Thread Prev