[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 202
  • Last Modified:

Automatically change Resolution in Win98

I want to write a small app for windows 98, 95, and NT, that will automatically change the screen resolution.
Probably in Visual c++
Requirements:
- no restarts
- no prompts
- just changes the resolution when run
Can anyone help please?
0
wilbot
Asked:
wilbot
  • 3
1 Solution
 
dhymesCommented:
Give this a try.

BOOL EnumDisplaySettings(LPCTSTR pszDeviceName, DWORD iModeNum, PDEVMODE lpDevMode);

Regards,
Dave
0
 
dhymesCommented:
Sorry, use

EnumDisplaySettings(LPCTSTR pszDeviceName, DWORD iModeNum, PDEVMODE lpDevMode);

to get the current and supported settings, then use

 LONG ChangeDisplaySettings(LPDEVMODE lpDevMode, DWORD dwflags);

To change the setting.
0
 
AlexVirochovskyCommented:
You can simple change resolution
and launch Apps:
To get current resolution:

int cx = GetSystemMetrics(SM_CXSCREEN),
cy = GetSystemMetrics(SM_CYSCREEN));

To change resolution:
  DEVMODE dm; dm.dmPelsWidth=cx; dm.dmPelsHeight=cy;
  dm.dmSize = sizeof(dm);
  dm.dmFields = DM_PELSWIDTH | DM_PELSHEIGHT;
  ChangeDisplaySettings(&dm, 0);
Alex
0
 
dhymesCommented:
Alex,

I could of submitted mine as answers also, why are you jumping out there when I am already working on this problem with wilbot? This is not the way we play the game out here so please go and read the rules.

Regards,
Dave
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now