Advertisement

Full Screen Problems

Started by December 03, 2001 10:06 PM
4 comments, last by pizza box 22 years, 11 months ago
I''m having a problem initializing DirectX 6.0. I want to make the window full screen on all computers, so I used DDSCL_FULLSCREEN ( and EXCLUSIVE ) with the SetCooperativeLevel(). Then I used SetDisplayMode() to make the window 640x480 and 8bpp. But my desktop is 1024x768 so when I run the program, only a section of my screen is initialized. Is there a way to temporarily change my screen to 640x480 when I run this program so it will work on all computers? Thanks
I have no idea if this will work, but since I'm working on a similar thing it might (I also have the same screen dimensions and the same desired dimensions.) I think the solution is in the CreateWindowEx function you used to create the window. Here's my code for that part:

    CreateWindowEx(NULL,				   "Winclass",				   "XBOX",				   WS_VISIBLE | WS_POPUP, //specifically these two commands				   0,0,				   640, 480,				   NULL,				   NULL,				   hinstance,				   NULL);    


Again, I dunno if this will do it but it's worth a try

Edited by - Peon on December 3, 2001 12:58:55 AM
Peon
Advertisement
If only a portion of your screen is initialized, your DX code probably failed, for normally it would set your screen resolution to 640x480 automatically (when you call SetDisplayMode). Make sure you have your DX code setup correct.
If only a portion of your screen is initialized, your DX code probably failed, for normally it would set your screen resolution to 640x480 automatically (when you call SetDisplayMode). Make sure you have your DX code setup correct.
I have noticed that this problem occurs on Win NT, when a program compiled with a newer version of DirectX tries to run on a machine with an older version installed. Check your versions to make sure your runtime>=compile libs. What OS are you using anyway?
"None of us learn in a vacuum; we all stand on the shoulders of giants such as Wirth and Knuth and thousands of others. Lend your shoulders to building the future!" - Michael Abrash[JavaGaming.org][The Java Tutorial][Slick][LWJGL][LWJGL Tutorials for NeHe][LWJGL Wiki][jMonkey Engine]
I am using DirectX 6.0 on Windows 98.

This topic is closed to new replies.

Advertisement