Solved

Automatically change Resolution in Win98

Posted on 2000-04-04
4
193 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
  • 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
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…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

867 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now