ChangeDisplaySettings(...) problem
Hi folks!
I''ve been using D3DIM for quite a long time (I remember coding with D3DIM execute buffers, if anyone here knows what these son of a b**** are), and feel that i should learn another API, just for the sake of knowlegde. So i started OGL with NeHe''s tutorials''s.
First, I would like to say that OGL it''s really easy and very direct, you get working code in minutes. However, I miss some functions you can use to bypass windows GDI, like in DirectX, and here cames my question:
How the hell can I tell the windows GDI function ChangeDisplaySettings(...) to behave in a decent way?
I''ll explain, my desktop is running in 32 bit mode, but my OGL program uses (or intend to do) 16 bit fullscreen mode. The problem is that ChangeDisplaySettings(...) in this circumstances is always returning DISP_CHANGE_RESTART, in other words, that i must restart the computer to get the desired display mode. And this only happens if the desktop color bit depth is diferent from the color bit depth i want to use. So, the question really is:
How can i change the display mode to a diferent color depth without restarting the computer?
Thanks!
There is a very easy and simple explaination to this. However, it will only work on systems that this has been applied and is not actually code. I''m sure there is code, I just don''t know it, and if you''re just trying things out or whatever, then this shouldn''t be a problem.
Hopefully you''re using Win98, cause I forget if 95 had this option and I know almost nothing about 2000. Anywho, here we go... Right-click on your desktop then click properties. The display properties appears... click on the Settings tab at the top, then on the advanced... button. This should bring you to the general advanced properties screen... At the bottom of the first page is a Compatibility box, uncheck restart the computer before applying the new color settings.
If that doesn''t do it, then I look like an idiot and I have no point at all.
S.
Hopefully you''re using Win98, cause I forget if 95 had this option and I know almost nothing about 2000. Anywho, here we go... Right-click on your desktop then click properties. The display properties appears... click on the Settings tab at the top, then on the advanced... button. This should bring you to the general advanced properties screen... At the bottom of the first page is a Compatibility box, uncheck restart the computer before applying the new color settings.
If that doesn''t do it, then I look like an idiot and I have no point at all.
S.
I''m sorry Danielillo, but I think it just can''t be done with Win32 using ChangeDisplaySettings()
You could have more success with DDraw...
It''s probably your video card or it''s driver that''s the problem.
I''m using Win95, and can switch with ChangeDisplaySettings() whenever I want to, to whatever display. (But I need DirectDraw to enter 320x200)
If there''s someone who doesn''t agree with me - please say so - I would also like to know because I''m a firm believer it can''t be done with ChangeDisplaySettings()...
You could have more success with DDraw...
It''s probably your video card or it''s driver that''s the problem.
I''m using Win95, and can switch with ChangeDisplaySettings() whenever I want to, to whatever display. (But I need DirectDraw to enter 320x200)
If there''s someone who doesn''t agree with me - please say so - I would also like to know because I''m a firm believer it can''t be done with ChangeDisplaySettings()...
you can use ChangeDisplaySettings() to change the screensize refressh rate etc on all win32 os''s though NOTE on the earliest version of win95 you still need a reboot.
basically all u have to do is call ChangeDisplaySettings() in the right place in your code IIRC its one of the first things u do
basically all u have to do is call ChangeDisplaySettings() in the right place in your code IIRC its one of the first things u do
Thanks you all.
I have Win95 OSR2, and i haven´t updated to 98 or W2K because many of my friends are having trouble with them. My computer is 2 years old, and it came with Win95 preinstalled, and i never have had to reinstall it. Yes it crashes, but not a lot, and i don´t need the new features of W98 and W2K, so i stick with W95.
And about the ChangeDisplaySettings() problem, I''ve decided to use DirectDraw and in top of it OpenGL. I''m not sure if this can be done, but i''ll try (not right now, i have final exams )
I have Win95 OSR2, and i haven´t updated to 98 or W2K because many of my friends are having trouble with them. My computer is 2 years old, and it came with Win95 preinstalled, and i never have had to reinstall it. Yes it crashes, but not a lot, and i don´t need the new features of W98 and W2K, so i stick with W95.
And about the ChangeDisplaySettings() problem, I''ve decided to use DirectDraw and in top of it OpenGL. I''m not sure if this can be done, but i''ll try (not right now, i have final exams )
with win95 osr2 theres no need for a reboot to change the display metrics
heres code for the change http://members.home.com/borealis/change.c
heres code for the change http://members.home.com/borealis/change.c
Zedzeek, I just tried to do it in two steps, first BPP change, then resolution change, and in reverse order, and none of them worked. It always fails when changing the bit depth. And always return DIP_CHANGE_RESTART.
My W95 version is 4.00.950 B. I think that´s OSR2, but not sure.
My W95 version is 4.00.950 B. I think that´s OSR2, but not sure.
yep thats osr2 goto my site http://members.xoom.com/myBollux download worldbuilder and see if that changes your screensize for you, if so ill write a demo program that changes yourscreen size (with code) , note IIRC that version will let you change your monitors hertz to higher than the monitor can handle, which aint a good thing
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement