MCPcopy Index your code
hub / github.com/DreamSourceLab/DSView / getMonitorWorkArea

Method getMonitorWorkArea

DSView/pv/winnativewidget.cpp:485–506  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

483}
484
485bool WinNativeWidget::getMonitorWorkArea(HMONITOR hMonitor, int *outWidth, int *outHeight)
486{
487 assert(outWidth);
488 assert(outHeight);
489
490 RECT rc = GetMonitorArea(hMonitor, false);
491
492 int borderSizeX = GetSystemMetrics(SM_CXSIZEFRAME);
493 int borderSizeY = GetSystemMetrics(SM_CYSIZEFRAME);
494 int workAreaWidth = rc.right - rc.left;
495 int workAreaHeight = rc.bottom - rc.top;
496 int maxWidth = workAreaWidth + borderSizeX * 2;
497 int maxHeight = workAreaHeight + borderSizeY * 2;
498
499 if (workAreaWidth > 0){
500 *outWidth = maxWidth;
501 *outHeight = maxHeight;
502 return true;
503 }
504
505 return false;
506}
507
508void WinNativeWidget::ResizeChild()
509{

Callers 1

WndProcMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected