• Advertisement

Archived

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

setting display mode

This topic is 6633 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

One of the past articles detailed this,

It's accessible from the menu on the left of the main screen

[This message has been edited by STG (edited November 19, 1999).]

Share this post


Link to post
Share on other sites
Advertisement
The function to do this is

lpdd->SetDisplayMode(SCREEN_WIDTH, SCREEN_HEIGHT, COLOR_MODE)

where lpdd is your direct draw object. But if you want to do this you have to include ddraw.h, and then create the direct draw object before hand.

Share this post


Link to post
Share on other sites
My problem is on Windows 95 only, no for Win98/NT4 (I used both GDI and DirectX). Example: my display is 16 bits depth, and I can't change to 8, and vice versa. But Starcraft did!

Share this post


Link to post
Share on other sites
I this what you mean?

to change it:

DEVMODE dmScreenSettings ;

dmScreenSettings.dmSize = sizeof(DEVMODE);
dmScreenSettings.dmPelsWidth = Width;
dmScreenSettings.dmPelsHeight = Height; dmScreenSettings.dmFields = DM_PELSWIDTH | DM_PELSHEIGHT;
ChangeDisplaySettings(&dmScreenSettings, CDS_FULLSCREEN);

to go back:

ChangeDisplaySettings(NULL, 0);

Share this post


Link to post
Share on other sites
I this what you mean?

to change it:

DEVMODE dmScreenSettings ;

dmScreenSettings.dmSize = sizeof(DEVMODE);
dmScreenSettings.dmPelsWidth = Width;
dmScreenSettings.dmPelsHeight = Height; dmScreenSettings.dmFields = DM_PELSWIDTH | DM_PELSHEIGHT;
ChangeDisplaySettings(&dmScreenSettings, CDS_FULLSCREEN);

to go back:

ChangeDisplaySettings(NULL, 0);

Share this post


Link to post
Share on other sites
Here's another problem:

If i switch the resolution to 800x600x16 with DirectX and the Desktop's resolution already is 800x600x16 the GFX are messed up.

I don't know why this happens...

[This message has been edited by Melo (edited November 24, 1999).]

Share this post


Link to post
Share on other sites
Thanks for your guide. In your code, I don't see the component: dmBitsPerPel, it is my problem! When I switch from 800x600x16 to 640x480x16, it is OK. But I can't switch to 640x480x8 mode(Win95 only).

Share this post


Link to post
Share on other sites
Could anyone help me how to change the display mode in Windows 95 by Windows API functions or DirectX?
Thanks a lot.

Share this post


Link to post
Share on other sites

  • Advertisement