>. 가능한 Duplicate: >. [어떻게 다운로드합니까? 에서 화면 해상도 모니터 황드?] (https://stackoverflow.com/questions/2156212/how-to-get-the-monitor-screen-resolution-from-an-hwnd)
텍스트 - 끝 - < 자동으로 삽입됨 >;!
스크린 해상도를 얻을 수 있는 방법이 c++에서? 나는 검색 MSDN 전송되지만 운빨이야. 내가 찾은 것이 아니라, 가장 가까운 것 [창디스플라이스팅스릭스 ()] (http://msdn.microsoft.com/en-us/library/dd183413.aspx), t # 39 는 doesn& 방법이 있을 것 같아 그냥 반품하십시오 res 바꾸지 않고 있습니다.
#include "wtypes.h"
#include <iostream>
using namespace std;
// 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;
}
출처: http://cppkid.wordpress.com/2009/01/07/how-to-get-the-screen-resolution-in-pixels/
엠바카데로 C++ builder 에서 이렇게 이해했소 수 있습니다.
Screen->Height;
Screen->Width;
이는 특정 제품에 포함되어 있는 VCL 프레임워크입니다 이다. C++, 델파이 구성기는.