HWND in Irrlicht
HWND in Irrlicht
I was wondering how could one get the HWND from Irrlicht, i would like to use it in DirectInput. Thanks!
-
[dx/x]=HUNT3R
- Posts: 271
- Joined: Sat Aug 23, 2003 5:52 pm
- Location: Hurricane Central, Florida
maybe a note to some user: if you create irrlicht in a dos-box(usin main() ), it is not easy to get the HWND, but if you need the HWND, you might as well create a win32 project with a winmain function, then you can get it, because (i think) the render window is then a child of your program, and thus accesible trough the HWND created by you in the winmain function. Please correct me if I'm wrong, cause I've not tested/checked this, its just an assumtion.
-
Guest
you wrong 
this is the code in CIrrDeviceWin32 constructor wich creates window. "Bold" NULL
is a window parent. Actually window handler is stored in the CIrrDeviceWin32 class object but you cannot reach it (it's private).
So you can make a small trick: Set a very unique
caption like this:
and then call
Now hWnd is a handle that you need 
Code: Select all
HWnd = CreateWindow( ClassName, "", style, windowLeft, windowTop, realWidth, realHeight, [b]NULL[/b], NULL, hInstance, NULL);
So you can make a small trick: Set a very unique
Code: Select all
device->setWindowCaption(L"A very unique caption");Code: Select all
HWND hWnd = FindWindow(NULL, "A very unique caption");-
Linuxhippy
- Posts: 5
- Joined: Mon Feb 02, 2004 9:43 am
Why???
I dont understand why working with win32. You loose all the great portability benefits irrlicht provides you.
That's the same stupid thing as aborting if FullScreenMode is not available in Java-1.4, so it isnt possible to run that app under Linux even it should run.
That's the same stupid thing as aborting if FullScreenMode is not available in Java-1.4, so it isnt possible to run that app under Linux even it should run.
-
Guest
-
Linuxhippy
- Posts: 5
- Joined: Mon Feb 02, 2004 9:43 am
Nööö
No, thats not absolutly true. Otherwise I would suggest no to port the game to windows 
-
[dx/x]=HUNT3R
- Posts: 271
- Joined: Sat Aug 23, 2003 5:52 pm
- Location: Hurricane Central, Florida
Re: Nööö
That's funny... bad penguin.Linuxhippy wrote:no to port the game to windows