Irrlicht window handle

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
warthog518
Posts: 2
Joined: Wed May 21, 2008 6:03 am

Irrlicht window handle

Post by warthog518 »

I'm trying to use DirectInput with Irrlicht but i need the handle to the window irrlicht creates =/
Any easier ways/ help/ experience? thanks

[i looked at http://www.directxtutorial.com/Tutorial ... aspx#still but thats if im creating the window =/ so.... yeah :) thanks]
radical-dev
Posts: 45
Joined: Thu Apr 24, 2008 7:54 pm
Location: Wickede, Germany

Post by radical-dev »

Hi warthog518!

Use the function IVideoDriver->getExposedVideoData. You'll find the window-handle in SExposedVideoData->hWnd.
s32 irr::video::SExposedVideoData::HWnd


Window handle. Get with for example HWND h = reinterpret_cast<HWND>(exposedData.D3D9.HWnd)

Greetings
warthog518
Posts: 2
Joined: Wed May 21, 2008 6:03 am

Post by warthog518 »

umm, could u post an example? i totally dont understand u :(
Halifax
Posts: 1424
Joined: Sun Apr 29, 2007 10:40 pm
Location: $9D95

Post by Halifax »

He just did give it to you:

Code: Select all

HWND hWnd = reinterpret_cast<HWND>(exposedData.D3D9.HWnd);
You do that after you create you Direct3D9 device. And if you aren't using a D3D9 device, then change it accordingly. If that doesn't make sense, then you should probably check the documentation.
TheQuestion = 2B || !2B
Post Reply