Computer Science, asked by watilajamir4396, 1 year ago

Write a program in c to find the resolution of our computer graphics

Answers

Answered by CyberAkay
0
Dear friend,
Kindly mark the answer as brainliest if you find it useful.

I am a C++ student, so here I have given a C++ code. There is not much difference between C and C++ , so hope you will not find any difficulty in converting the code. Here's what you were looking for:

#include "wtypes.h"
#include <iostream>
// Get the horizontal and vertical screen sizes in pixel
void GetDesktopResolution(int& horizontal, int& vertical)
{
RECT desktop; // Get a handle to the desktop window
const HWND hDesktop = GetDesktopWindow();
// Get the size of screen to the variable desktop
GetWindowRect(hDesktop, &desktop);
// The top left corner will have coordinates (0,0)
// and the bottom right corner will have coordinates
// (horizontal, vertical) horizontal = desktop.right;
vertical = desktop.bottom;
}
int main()
{
int horizontal = 0;
int vertical = 0; GetDesktopResolution(horizontal, vertical); cout << horizontal << '\n' << vertical << '\n'; return 0;
}

Hope this clears your doubt.✌

DO FOLLOW ME FOR SUCH QUALITY ANSWERS.
Answered by AngelCutiee
1

Answer

Disappearing Buttons | Resolution Independence | Graphics | '3D' Depth | Splash ... For instance we could write cmdBottomRight . ... C:\Program Files\DevStudio\Vb\Graphics\ Metafile.

Similar questions