Page 1 of 1

how to modify CreateWindowEx to force windowed mode?

Posted: Tue Apr 06, 2010 1:09 pm
by Rheini
I have an old game which I'd like to run in windowed mode.
Shouldn't it be possible to force this by editing the arguments to CreateWindowEx calls or whatever?

Re: how to modify CreateWindowEx to force windowed mode?

Posted: Tue Apr 06, 2010 2:32 pm
by jfwfreo
If the game is a modern game, you will have to hack the Direct3D calls the game makes. Its not easy to add windowed mode to a game that doesn't support it.

CreateWindowEx has nothing to do with windowed mode vs fullscreen mode.

Re: how to modify CreateWindowEx to force windowed mode?

Posted: Tue Apr 06, 2010 3:06 pm
by Uli
Look up something called "D3DWindower" (Website in the Readme for it: http://www.geocities.jp/menopem/ )
I use it to force DK2 into window mode, might work for the game your trying to play

Re: how to modify CreateWindowEx to force windowed mode?

Posted: Tue Apr 06, 2010 4:10 pm
by Rheini
It's an old DirectDraw game.

Re: how to modify CreateWindowEx to force windowed mode?

Posted: Tue Apr 06, 2010 4:19 pm
by Uli
Rheini wrote:It's an old DirectDraw game.
DXWnd works with DirectDraw games however it was only some versions can't remember which ones

Re: how to modify CreateWindowEx to force windowed mode?

Posted: Tue Apr 06, 2010 4:27 pm
by Rheini
Is there any article or tutorial about how functions need to be hooked?
Would need to statically hook it for debugging it properly.

Re: how to modify CreateWindowEx to force windowed mode?

Posted: Tue Jun 01, 2010 12:07 pm
by Darkstar
Look for the Microsoft Detours library, available somewhere on research.microsoft.com. It can do function hooking, so you can modify the arguments to CreateWindowEX() there

-Darkstar

Re: how to modify CreateWindowEx to force windowed mode?

Posted: Tue Jun 01, 2010 3:48 pm
by Rheini
I know Detours. I can also directly modify the game executable and/or use a proxy DirectDraw dll.
The only question is what parameters need to be changed and how.