Solved

Automatically change Resolution in Win98

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

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…
Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

726 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