Archived

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

stefu

Leaving fullscreen makes my DevStudio smaller.

Recommended Posts

When I leave D3D8 fullscreen mode, my DevStudio apperas the to be sized to the fullscreen dimensions. That means: If my desktop has resolution 1024x760. Then I run my game with 800x600. When I exit my app, my DevStudio is still maximized, but its size is 800x600. I have to minimize and maximize Visual c++ DevStudio to make it maximized again to 1024x468. ? What''s wrong ?

Share this post


Link to post
Share on other sites
There are a variety of things which people say make it stop doing that, but through experience I have found the effect of fixing it to be largely psychological. Basically, there''s no way to fix this problem. What you can do is instead of maximising the DevStudio window, close all other windows and right click the taskbar and select Tile Horizonally or Tile Vertically. The window will now be sized to fill the screen. This actually _does_ fix it, but there''s no way to stop the application doing it to a maximised window.

Share this post


Link to post
Share on other sites
LOL same thing is happening to me but for an unexlixable reason after I copied most of the code into a new project it stopped happening.????? ( i have no idea why ) ?????

K I just tested some changes and I think it''s because I was releasing the main interface before releasing the Direct3D (Buffers, Textures) objects created with it. LOL OOP isn''t all it''s cracked up to be. Unfortunatly the only ways to fix this that I can think of are encapsulating the LPDIRECT3D8 & IDirect3DDevice8 COMs in a class/object type so they are destroyed at the end of the project with the rest of teh objects or... check dis out:

I use pointers to class instances in my new project instead of normal ones eg

classMonster* pbahamut; instead of...
classMonster bahamut;

IMHO this is a better way because you can create and destroy these structures anytime in your program (well almost anytime for example at the end right before you release your LPDIRECT3D8 and IDirect3DDevice interfaces. To access the member functions of your instances just use the -> sign instead of the "."

eg>
classMonster *pOgre;

pOgre = new classMonster; // calls classMonster()
pOgre->DoWhatever() // calls classMonster.DoWhatever()
delete pOgre; // calls classMonster''s destructor (~classMonster)

then you can safely do this:

IDirect3DDevice->Release();
LPDIRECT3D8->Release();

I hope this helps out.

infinitycool

Share this post


Link to post
Share on other sites
G''day!

I used to have this problem. It was the way I was shutting everything down. If you check out any of the examples on my site (www.drunkenhyena.com, or just click my sig) you see that my shut down is very carefully.

It''s not the M$ recommended way, I don''t do any of my clean up code in the message handlers but it works well and it is perfectly ''legal'' code.

I also think my way is better stylistically, it''s more orthogonal. If I create the window, I should shut it down, not politely ask it to do so and let it take down the rest of my stuff with it. But that''s personal taste.


Stay Casual,

Ken
Drunken Hyena

Share this post


Link to post
Share on other sites