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.