Solved

Automatically change Resolution in Win98

Posted on 2000-04-04
4
198 Views
Last Modified: 2010-04-10
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
Comment
Question by:wilbot
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 2

Expert Comment

by:dhymes
ID: 2685981
Give this a try.

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

Regards,
Dave
0
 
LVL 2

Expert Comment

by:dhymes
ID: 2685983
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
 
LVL 14

Accepted Solution

by:
AlexVirochovsky earned 250 total points
ID: 2686325
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
 
LVL 2

Expert Comment

by:dhymes
ID: 2686910
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question