Click here to Skip to main content
15,922,533 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How do you rotate/resize screen resolution? I mean like a code example. I already know the syntax is:
C++
LONG ChangeDisplaySettings(
  __in  DEVMODE *lpDevMode,
  __in  DWORD dwflags
);

But I don't really understand the "devmode" part. I've looked up information about it here: http://msdn.microsoft.com/en-us/library/dd183565(v=VS.85).aspx[^]

I still don't get it even after reading over ten times.

Thanks for the help in advance!
TKG
Posted
Updated 29-Mar-11 9:18am
v2
Comments
Sandeep Mewara 29-Mar-11 15:19pm    
Please use PRE tags to format the code part from next time. It makes the question readable and maintains the identation of the code.

1 solution

The DEVMODE data structure is related with the current diaply details including the driver name, resolution etc.

if you want to get the DEVMODE details for the current diaplay, you can use
EnumDisplaySettings().

http://msdn.microsoft.com/en-us/library/dd162611%28VS.85%29.aspx[^]


in ChangeDisplaySettings() you can use DEVMODE* as NULL value, If lpDevMode is NULL, all the values currently in the registry will be used for the display setting.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900