일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 29 | 30 | 31 |
- SERIAL
- Contour
- public
- file access
- memory
- mfc
- digitalRead
- edge
- Gaussian
- Android
- flutter
- Encapusulation
- compare
- atmega328
- stream
- Class
- subpixel
- Pointer
- Unity
- Filtering
- APP
- wpf
- c++
- aduino
- Read
- parameter
- Gradient
- UNO
- Binary
- sensor
- Today
- Total
목록GetDC (2)
폴크(FOLC)

# 현재 모니터 화면에서 특정한 영역의 정보를 이미지 파일로 저장 > ATL::CImage 형태를 이용 # MFC 에서 CImage 을 기본으로 제공 # 소스 코드 HDC hdcSrc = ::GetWindowDC(NULL); const int size_x = GetSystemMetrics(SM_CXSCREEN); const int size_y = GetSystemMetrics(SM_CYSCREEN); const int BitpPx = GetDeviceCaps(hdcSrc, BITSPIXEL); CImage image; if (image.Create(size_x, size_y, BitpPx, 1) == TRUE) { BitBlt(image.GetDC(), 0, 0, size_x, size_y, hdcSrc..

# 현재 모니터 화면에서 특정한 영역의 정보를 이미지 파일로 저장 > Bitmap 형태를 이용 # MFC 에서 Bitmap 을 기본으로 제공 # 소스 코드 bool CScreenCapture::CaptureFullscreen() { HDC h_screen_dc = ::GetDC(NULL); int dstX = ::GetDeviceCaps(h_screen_dc, HORZRES); int dstY = ::GetDeviceCaps(h_screen_dc, VERTRES); CaptureROI(h_screen_dc, 0, 0, dstX, dstY); if (NULL != h_screen_dc) ::ReleaseDC(NULL, h_screen_dc); return true; } bool CScreenCapture:..