Important information: this site is currently scheduled to go offline indefinitely by end of the year.

how to modify CreateWindowEx to force windowed mode?

Coders and would-be coders alike, this is the place to talk about programming.
Post Reply
Rheini
Moderator
Posts: 652
Joined: Wed Oct 18, 2006 9:48 pm
Location: Germany
Has thanked: 19 times
Been thanked: 46 times
Contact:

how to modify CreateWindowEx to force windowed mode?

Post 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?
jfwfreo
veteran
Posts: 124
Joined: Sat Nov 15, 2008 1:31 am
Been thanked: 24 times

Re: how to modify CreateWindowEx to force windowed mode?

Post 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.
Uli
advanced
Posts: 46
Joined: Fri Dec 11, 2009 7:42 pm
Has thanked: 3 times
Been thanked: 6 times

Re: how to modify CreateWindowEx to force windowed mode?

Post 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
Rheini
Moderator
Posts: 652
Joined: Wed Oct 18, 2006 9:48 pm
Location: Germany
Has thanked: 19 times
Been thanked: 46 times
Contact:

Re: how to modify CreateWindowEx to force windowed mode?

Post by Rheini »

It's an old DirectDraw game.
Uli
advanced
Posts: 46
Joined: Fri Dec 11, 2009 7:42 pm
Has thanked: 3 times
Been thanked: 6 times

Re: how to modify CreateWindowEx to force windowed mode?

Post 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
Rheini
Moderator
Posts: 652
Joined: Wed Oct 18, 2006 9:48 pm
Location: Germany
Has thanked: 19 times
Been thanked: 46 times
Contact:

Re: how to modify CreateWindowEx to force windowed mode?

Post 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.
Darkstar
advanced
Posts: 67
Joined: Thu Jun 14, 2007 1:14 pm
Location: Southern Germany
Has thanked: 7 times
Been thanked: 1 time
Contact:

Re: how to modify CreateWindowEx to force windowed mode?

Post 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
Rheini
Moderator
Posts: 652
Joined: Wed Oct 18, 2006 9:48 pm
Location: Germany
Has thanked: 19 times
Been thanked: 46 times
Contact:

Re: how to modify CreateWindowEx to force windowed mode?

Post 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.
Post Reply