Archived

This topic is now archived and is closed to further replies.

pUnkOuter

DD fullscreen to windowed

Recommended Posts

pUnkOuter    122
does anyone know if it''s possible to switch from DDraw fullscreen mode to windowed without destroying and recreating the window? when i try, it makes the window the windows screen size (800x600 in my case, instead of the 640x480 it should be).. if i initialize the app in windowed mode, it looks fine, and switches to fullscreen fine, but switching back to windowed changes the window size.. it seems there should be a simple Win32 function to change the window size, something similar to SetWindowLong(), and yet i''m at a loss to find it... or is the answer painfully obvious and i''ve just been staring at the monitor too damn long? ------------------------ IUnknown *pUnkOuter "Try the best you can try the best you can the best you can is good enough" --Radiohead

Share this post


Link to post
Share on other sites
digital-magi    122
If you have the actual DDraw code working and all you need is the Win32 function to resize your window then I suggest you try either SetWindowPos or MoveWindow. They are both in the Windows SDK help, as are others that might be helpful.



Regards,
Ralph Potter
ralph.potter@digital-magi.com, http://www.digital-magi.com

Share this post


Link to post
Share on other sites
Gaiiden    5710
try looking through the past featured articles, I beleive some time ago there was an article about switching to windowed mode in DirectX or something like that. (gosh, I feel old)

==============================
"Need more eeenput..."

- #5, "Short Circuit"
==============================

Share this post


Link to post
Share on other sites
pUnkOuter    122
Gaiiden, i did check the articles on switching between fullscreen and windowed mode with DirectX, but they destroy the window and recreate it..

digital-magi, of course, MoveWindow().. thanks, i don''t know how i missed it. come to think of it, the problem probably lies in my function which sets the window size (to make the Client RECT the width and height i desire).. i posted that around 3am after programming since noon more of less straight...

------------------------
IUnknown *pUnkOuter

"Try the best you can
try the best you can
the best you can is good enough"
--Radiohead

Share this post


Link to post
Share on other sites
pUnkOuter    122
i apoligize for creating this thread. it was a simple problem, but it was too late and i''d been programming too long to catch it... i was setting the window size before i created the DDraw surfaces, which kinda confused DirectDraw i guess, since the mode when i set the window size was still fullscreen mode.. simply setting the window size after creating the surfaces works just fine...

------------------------
IUnknown *pUnkOuter

"Try the best you can
try the best you can
the best you can is good enough"
--Radiohead

Share this post


Link to post
Share on other sites