Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 8 | 9 | 10 | 11 | 12 | 13 | 14 |
| 15 | 16 | 17 | 18 | 19 | 20 | 21 |
| 22 | 23 | 24 | 25 | 26 | 27 | 28 |
Tags
- window
- 리뷰
- json
- range
- windows
- write
- API
- mutex
- go
- tcp
- Callback
- Linux
- Golang
- channel
- GO 언어
- Python
- Sync
- JavaScript
- http
- go언어
- C
- 책
- File
- bitcoin
- install
- package
- Close
- FOR
- c++
- 영화
Archives
- Today
- Total
Code Habit
[WinAPI] GetMonitorInfo - 모니터 Display 정보 구하기 본문
GetMonitorInfo를 사용하여 모니터 Display 정보를 구할 수 있다.
BOOL GetMonitorInfoA(
[in] HMONITOR hMonitor,
[out] LPMONITORINFO lpmi
);
hMonitor에 구하고자 하는 모니터 핸들을 넘기면 해당 모니터의 Display 정보를 MONITORINFO(structure)로 전달 받는다.
이때 MONITORINFO의 멤버변수 중 cbSize를 sizeof(MONITORINFO) (or sizeof(MONITORINFOEX)로 초기화하고 전달해야 한다.
typedef struct tagMONITORINFO {
DWORD cbSize;
RECT rcMonitor;
RECT rcWork;
DWORD dwFlags;
} MONITORINFO, *LPMONITORINFO;
rcMonitor로 모니터 Display정보를 전달받고 rcWork로 작업영역 정보를 전달 받는다.
