setting display mode

Started by
7 comments, last by Tuan 24 years, 4 months ago
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).]

Advertisement
This tutorial covers the DirectX part: http://members.tripod.com/mxf_entertainment/tutorials/directdraw.htm

------------------
- mallen22@concentric.net
- http://members.tripod.com/mxf_entertainment/

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.

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!
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);

- I don't pretend to know anything.Snowsoft
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);

- I don't pretend to know anything.Snowsoft
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).]

Could anyone help me how to change the display mode in Windows 95 by Windows API functions or DirectX?
Thanks a lot.
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).

This topic is closed to new replies.

Advertisement