![]() |
General Programming »
Programming Tips »
General
Intermediate
ResSwitch & ResList v1.2 - Easily change screen resolutionBy PJ Naughter2 freeware utilities to quickly change Screen Depth and Resolution. |
VC6, MFC, Dev
|
|
Advanced Search |
|
|
|
||||||||||||||||
ResSwitch.exe 1024 768 24 0. With this structure you can create a number
of shortcuts to ResSwitch on your desktop using different command lines which
will allow you to change mode with a simple double click on your desktop. By setting up
shortcut keys in the shortcut file to ResSwitch you can quickly change modes
by just using the keyboard only. The size of the binary file itself is only 6K.
Also included is ResList which is a simple console app which lists the available
video modes which ResSwitch can use.
The source zip file contains the ResSwitch and ResList source
code, a very handy MFC class to wrap access to the two underlying APIs. ResSwitch
and ResList use and a prebuilt binary version of both programs. The enclosed
binary requires that you have the MFC 4.2b DLLs already installed. If you haven't already
got them on your machine (MFC42.DLL in your Windows system directory), then grab them from
Microsoft's web site at
http://activex.microsoft.com/controls/vc/mfc42.cab.
| Usage |
| History |
| API Reference |
| Contacting the Author |
#include videomod.h in which ever of your modules needs to make calls to the class.
History
v1.1 (25 September 1997)
QuickerRes to QRes to avoid conflict with a
similarly named third party product.
QList (binary & source
code) with enumerates all the video modes available. Comes in helpful if QRes
is reporting that some options you select are unavailable.
v1.2 (4 January 1999)
QRes to ResSwitch to avoid
conflict with another similarly named third party product.
API Reference
The API consists of the public member functions of the classes CVideoMode & CVideoModes.
CVideoMode
CVideoModes::GetCurrentVideoMode
CVideoModes::GetAvailableVideoModes
CVideoModes::ChangeVideoModePermanently
CVideoModes::ChangeVideoModeTemporarily
CVideoModes::CanChangeVideoMode
CVideoModes::RevertVideoModeToDefault
Return Value:
TRUE if the current video mode was retrieved successfully otherwise FALSE.
Parameters:
Remarks:
Internally this retrieves the current settings GetDeviceCaps() function on a device
context for the display.
Return Value:
TRUE if the available video modes were retrieved successfully otherwise FALSE.
Parameters:
Remarks:
Returns all the video modes which the display adapter supports.
CAvailableVideoModes is defined as follows:
typedef CArray<CVideoMode, CVideoMode&> CAvailableVideoModes;
Return Value:
Returns one of the following values:
| Value | Meaning |
| DISP_CHANGE_SUCCESSFUL | The settings change was successful. |
| DISP_CHANGE_RESTART | The computer must be restarted in order for the graphics mode to work. |
| DISP_CHANGE_BADFLAGS | An invalid set of flags was passed in. |
| DISP_CHANGE_FAILED | The display driver failed the specified graphics mode. |
| DISP_CHANGE_BADMODE | The graphics mode is not supported. |
| DISP_CHANGE_NOTUPDATED | Unable to write settings to the registry. |
Parameters:
Remarks:
If this function succeeds then the changes are permanent, meaning that upon next boot of Windows the
video mode will be the preserved to that which you just changed into.
Return Value:
The return value is the same as ChangeVideoModePermanently.
Parameters:
Remarks:
If this function succeeds then the changes are not permanent, meaning that upon next boot of Windows
the video mode will be the the same as before you called this function.
Return Value:
The return value is the same as ChangeVideoModePermanently.
Parameters:
Remarks:
Using this function allows an application to determine if a specified graphics modes is actually valid,
without causing the system to change to that graphics mode.
Return Value:
The return value is the same as ChangeVideoModePermanently.
Remarks:
Using this function allows an application to determine if a specified graphics modes is actually valid,
without causing the system to change to that graphics mode.
Contacting the Author
PJ Naughter
Email: pjn@indigo.ie
Web: http://www.naughter.com
4th January 1999
General
News
Question
Answer
Joke
Rant
Admin
|
PermaLink |
Privacy |
Terms of Use
Last Updated: 3 Mar 2000 Editor: Valerie Bradley |
Copyright 2000 by PJ Naughter Everything else Copyright © CodeProject, 1999-2009 Web20 | Advertise on the Code Project |