Page 1 of 1

Window/Device position

Posted: Thu Sep 30, 2010 3:59 am
by forX
its a simple question:

How did we move/change the position of a window/device in NOT fullscreen mode?

tank you

Posted: Thu Sep 30, 2010 6:36 am
by rtr_18
in NOT fullscreen mode
I can't understand what do you mean by this. What you are trying to do? What you have acheived? Regarding which you need help? Can u post any code snippet?

Posted: Thu Sep 30, 2010 7:18 am
by hybrid
You have to use the mouse or low-level calls on the base device. IIRC, we don't have such methods in Irrlicht.

Posted: Thu Sep 30, 2010 9:12 pm
by forX
tanks
but I'm not really that much advanced,
did you have any direction or something that can help me to go that way.
maybe somebody else project?

tank you

Posted: Thu Sep 30, 2010 9:57 pm
by no_response
well, if you're writing for windows, you can use the win api :

Code: Select all

MoveWindow(windowhandle, pixelsX, pixelsY, windowsizeX, windowsizeY, redraw?);
you can search MSDN for the function.


the windowhandle can be obtained the following way (the example is for OpenGL, else check the Irrlicht reference)

Code: Select all

HWND winhandle = reinterpret_cast<HWND>(driver->getExposedVideoData().OpenGLWin32.HWnd);
pixelsX and pixelsY are the new position of the top left corner of the window.

windowsizeX and windowsizeY are the size of the window when you were creating the device;

redraw should be true.