Page 1 of 1

Irrlicht Window

Posted: Mon Aug 02, 2004 10:12 am
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

Posted: Mon Aug 02, 2004 1:35 pm
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.

Posted: Mon Aug 02, 2004 8:49 pm
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? :?:

Posted: Mon Aug 02, 2004 11:00 pm
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

Posted: Tue Aug 03, 2004 5:20 am
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.

Posted: Tue Aug 03, 2004 7:50 am
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

Posted: Tue Aug 03, 2004 10:56 am
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.

Posted: Wed Aug 11, 2004 4:16 pm
by puh
NovaCoder, would be great to see your code snippet for passing our own window in an Irrlicht HWND.

Posted: Thu Aug 12, 2004 10:23 am
by NovaCoder
^^ It's on my site now...