I tried to change screen resolution with my project(by using API)
then, it works find.
and i wanted to know if there's any difference from when i change resolution with display settings(on the desktop).
So, i printed all message happening.
As I checked both occurs different message.
the way with my code occurs 647.. something, but the other way with display settings occurs nothing.
(just in case, i put some code I did)
DISPLAY_DEVICE dd = GetPrimaryDevice();
dm.dmSize = sizeof(DEVMODE);
if (!EnumDisplaySettings(dd.DeviceName, ENUM_CURRENT_SETTINGS, &dm))
printf("EnumDisplaySettings failed:%d\n", GetLastError());
dm.dmPelsWidth = PelsWidth;
dm.dmPelsHeight = PelsHeight;
dm.dmFields = (DM_PELSWIDTH | DM_PELSHEIGHT);
if (ChangeDisplaySettings(&dm, CDS_TEST) !=DISP_CHANGE_SUCCESSFUL)
printf("\nIllegal graphics mode: %d\n", GetLastError());
return (ChangeDisplaySettings(&dm, 0)==DISP_CHANGE_SUCCESSFUL);
How can I change resolution like using display settings??
Topic archived. No new replies allowed.