Embedding a third-party application window into a wxWidgets
window
zaiboot
zaiboot at e-mediasoftware.com
Wed Sep 5 07:09:21 PDT 2007
Hello sandro, I am not a guru, but I'm on my way ;-)
I have been using wxWidgets and win32 api with VC6 and in msdn 6.0 I found
this:
GetWindow
The GetWindow function retrieves a handle to a window that has the specified
relationship (Z order or owner) to the specified window.
HWND GetWindow(
HWND hWnd, // handle to original window
UINT uCmd // relationship flag
);
SetParent
The SetParent function changes the parent window of the specified child
window.
HWND SetParent(
HWND hWndChild, // handle to window whose parent is changing
HWND hWndNewParent // handle to new parent window
);
EnumWindows
The EnumWindows function enumerates all top-level windows on the screen by
passing the handle to each window, in turn, to an application-defined
callback function. EnumWindows continues until the last top-level window is
enumerated or the callback function returns FALSE.
BOOL EnumWindows(
WNDENUMPROC lpEnumFunc, // pointer to callback function
LPARAM lParam // application-defined value
);
Maybe you can use it with something like this:
1. Call enum windows.
2. in the callback proc I call get window, if i found the desired window do
some processing, like calling SetParent or ShowWindow and return false,
otherwise return true, so I can get the next HWND.
I have seen that before and maybe is a trick, but I think that it can be
done.
greetings
-----Mensaje original-----
De: Sandro Sigala [mailto:sandro at sigala.it]
Enviado el: Martes, 04 de Septiembre de 2007 10:24 p.m.
Para: wx-users at lists.wxwidgets.org
Asunto: Embedding a third-party application window into a wxWidgets window
Hello to all,
This is a question to all the Win32 API gurus :-)
I'm developing a Win32 wxWidgets application that executes another Win32
third-party application.
I would like to integrate somehow the third-party application into my own
application window. The 3rd-party application is a Win32 GUI standard app
that shows only one window on the screen.
I thought of two possible (?) solutions:
1) Real embedding: reparent the third party window using the Windows API
into my own application window;
2) Fake embedding: force the third party window size and position onto my
own application window and remove the 3rd-party application title bar using
the Windows API.
I'm not an expert and maybe the solution 1) is not possible, but the 2) I
guess it's somehow possible.
Any thoughts?
Thanks in advance,
Sandro
--
Sandro Sigala
sandro AT sigala DOT it GPG Key: 0xB54F3B39
() Please avoid sending me Word attachments /\ see
http://www.gnu.org/philosophy/no-word-attachments.html
ASCII Ribbon Campaign - Against HTML Mail, Proprietary Attachments
---------------------------------------------------------------------
To unsubscribe, e-mail: wx-users-unsubscribe at lists.wxwidgets.org
For additional commands, e-mail: wx-users-help at lists.wxwidgets.org
__________ Información de NOD32, revisión 2507 (20070905) __________
Este mensaje ha sido analizado con NOD32 antivirus system
http://www.nod32.com
More information about the wx-users
mailing list