Maximize is WAY slower bUT solves the Lost "device" issue if someone is full screen and switches to a desktop app then tries to go back to your program and it chokes. Futhermore - on this topic, I've people say its the programmers responsibility to "rebuild the scene" and now that I have had some time in DirectX - this is a crock! I'll elaborate below.
First - the small window then resizing thing - yeah that happens because the lib is init'd internally I think to the 640x480 size, then your code executes. I've tried various methods to contend with - like centering the window among others and decided to just put the window at 0,0 and size accordingly OR go full screen.
- Back to Lost Device -
If DarkGDK is managing the textures, meshes etc in memory for us already - there is NO REASON WHATSOEVER it can't be built into DarkGDK. In DirectX - you basically have 3 main dilly to contend with concerning "lost device". Let me point out that each "loop" you test to see if you lost the device. If So - there is some cleanup - and then reloading/recreating stuff. I can't see why this isn't part of DarkGDK though.
For an object, you might want to cover your bases like this: One function loads your object (its like an init function but often referred to as a "restore" function - because you can have some init stuff that doesn't need to be run for each "restore" of the previously non-existant or broken device).
1: Restore
2: Render
3: Destroy
If your device is broke in dx, you destroy first - then call your restore function to get it back.
Now for bitmaps and textures I guess this could be problematic for images not loaded from disk (if from disk, DarkGDK could just remember what the file name was and reload as necessary) but even this should be able to be overcome because in dx there are three main ways to store gfx info - vram, vram(managed by dx), and system ram - where you need to thunk the data yourself to vram.
Now - I might have my nomenclature off a bit in this post - but generally speaking... in dx9 - the mechanism one would write to restore a lost device (going fullscreen to desktop breaks it usually, and going back to full screen is the restore I mean) happens pretty dang fast. I have in this demo I made here:
ftp://jegas.com/setupkatana0010.exe
The ability to go fullscreen to windowed via ALT+ENTER and back and its just about instantanious. Why? Because the mesh data is in system ram - then I just tell DX9 during the restore: "See this Data? Its a mesh for you!" then it does what it does to prep it - and then in the render I say "Remember that mesh named whatever? Render it like this...." and it does it.
So - I'm done - sorry to rant - thought this info would be interesting to some.
In fact, I'd bet that the next "release" of DarkGDK (if there is one...I hope so) does this for us automatically.
--Jason