Irrlicht window as child of parent window

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
etcaptor
Posts: 871
Joined: Fri Apr 09, 2004 10:32 pm
Location: Valhalla
Contact:

Irrlicht window as child of parent window

Post by etcaptor »

Have someone any idea, how can set parent window of Irrlicht device ?
Thanks in advance.
tip
Posts: 50
Joined: Fri Feb 13, 2004 8:53 am
Location: grenoble, France
Contact:

Post by tip »

why not try
HWND hWndChild = FindWindow(NULL,"type here your Window name");
SetParent(hWndChild, hWndNewParent);
etcaptor
Posts: 871
Joined: Fri Apr 09, 2004 10:32 pm
Location: Valhalla
Contact:

Post by etcaptor »

Good, but wath is default name of Irrlicht window?
I can't see some name parameters in irrlicht help.
Guest

Post by Guest »

the name to use in FindWindow is exactly the one you use in
device->setWindowCaption(L"The name to use");

this said, i'm not sure of what you can do (docking the irrlicht window in another application?). you've to try.
etcaptor
Posts: 871
Joined: Fri Apr 09, 2004 10:32 pm
Location: Valhalla
Contact:

Post by etcaptor »

Thanks, I will try it.
My goal is to set irrlicht window as "windowed" control on delphi form of C++Builder application.
I wonder even to put more then one control, but first must example your method :wink:
etcaptor
Posts: 871
Joined: Fri Apr 09, 2004 10:32 pm
Location: Valhalla
Contact:

Post by etcaptor »

Great - it's work :D

Code: Select all


#include <Classes.hpp> //needed for FindWindow function in BCB
device->setWindowCaption(L"irrwnd");
HWND hWndChild = FindWindow(NULL,"irrwnd");
SetParent(hWndChild, Form1->Handle);

Post Reply