Irrlicht Window

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Garu
Posts: 5
Joined: Sun Apr 25, 2004 10:34 am

Irrlicht Window

Post by Garu »

Hi all,
Anybody have tried to remove the main irrlicht window? I think it's created during function createDevice() is called. I want to remove the main window as i have the rendered screen displayed on MFC. Anybody have an idea which part of code i need to remove from the source?

thanks in advance
Guest

Post by Guest »

Not really tried yet,
but would be very interesting having
Irrlicht output as ActiveX component in a VB app. Do you think it's possible?

anyway...

the window is created in CIrrDeviceWin32.cpp

Line 323
HWnd = CreateWindow( ClassName, "", style, windowLeft, windowTop,
realWidth, realHeight, NULL, NULL, hInstance, NULL);

Hope this could help U.
Ryoga2k
Posts: 21
Joined: Mon May 03, 2004 6:59 pm
Location: Asturias, Spain

Post by Ryoga2k »

Hi, guys

maybe it would work getting the window handle of the Irrlicht window. So you could manage it as a normal Windows window.

Is there any way to get this HWnd? :?:
"There's always a way, if desire meets courage"
Conan of Cimmeria
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

Ryoga2k wrote:Is there any way to get this HWnd? :?:
Well, for windows there is a great thing called API !!! :wink:
With it you're be able to manipulate the whole system at low level... :twisted:

To get the handle of a window use this function:

Code: Select all

#include <windows.h>

HWND__* hWnd = FindWindow("CIrrDeviceWin32", NULL);
I'm using DevCpp so maybe you have to change the var type (HWND__*) for other sdks, but I don't know that... :?

CU, Acki
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
NovaCoder
Posts: 28
Joined: Wed May 26, 2004 11:36 am
Contact:

Post by NovaCoder »

You can update it so you can pass in an HWND of your own window, then the engine will not create it's own but will store a reference to yours instead. I can post the code up if you want it.
- Nova
Guest

Post by Guest »

HI,

yes this should work so far. But cannot try atm.
As I see it, on creates a window and get the handle 4it.

from VB side this could work:

Private Declare Function SendMessageA Lib "user32" ( _
ByVal hWnd As Long, ByVal uMsg As Long, _
ByVal wParam As Long, ByVal lParam As Long) As Long

Dim hWnd As Long

hWnd = FindWindow("CIrrDeviceWin32", 0)

SendMessageA .hWnd, MSG, 0, -1



see ref.:

http://www.geocities.com/practicalvb/vb ... sages.html

http://support.microsoft.com/default.as ... bContent=1
Ryoga2k
Posts: 21
Joined: Mon May 03, 2004 6:59 pm
Location: Asturias, Spain

Post by Ryoga2k »

Originally posted by Acki
#include <windows.h>
HWND__* hWnd = FindWindow("CIrrDeviceWin32", NULL);
Thanks a lot Acki! :D
Originally posted by NovaCoder
I can post the code up if you want it.
Yes NovaCoder, I´ll be very grateful if you post the code for passing the handle of my own window.
"There's always a way, if desire meets courage"
Conan of Cimmeria
puh
Posts: 356
Joined: Tue Aug 26, 2003 3:53 pm

Post by puh »

NovaCoder, would be great to see your code snippet for passing our own window in an Irrlicht HWND.
NovaCoder
Posts: 28
Joined: Wed May 26, 2004 11:36 am
Contact:

Post by NovaCoder »

^^ It's on my site now...
- Nova
Post Reply