Link to home
Start Free TrialLog in
Avatar of balakiran_bs
balakiran_bs

asked on

Display resolution

how  to change the Display resolution
using an MFC program ??

From the Settings tab of Desktop
properties, we can set the display
resolution. I want to do the same
programatically.

   plz suggest the solution.
Avatar of rushinmonkey
rushinmonkey

hi

you want to look at ChangeDisplaySettings

eg

   if (EnumDisplaySettings(NULL,ENUM_CURRENT_SETTINGS,&m_CurDisplayMode))
   {
      DEVMODE  DisplayMode = m_CurDisplayMode;

      DisplayMode.dmPelsWidth = 640;
      DisplayMode.dmPelsHeight = 480;

      ChangeDisplaySettings(&DisplayMode,CDS_FULLSCREEN);

   }
ASKER CERTIFIED SOLUTION
Avatar of AndyAinscow
AndyAinscow
Flag of Switzerland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I know exactly that my link gives working solution.
The code I posted is from a VC sample which is how to change the display resolution.