development/Common/Utility/source/Win32/ProcHandler.cpp
//--------------------------------------------------------------------------------------------------
// return width, height of window which includes all decorations to fit canvas of resX by resY
return width, height of window which includes all decorations to fit canvas of resX by resY
return width height of window which includes all decorations to fit canvas of resX by resY
std::tuple<int, int> CalculateWindowFrame(HWND hWnd, int resX, int resY)
    {
        RECT rcClient, rcWind;
        POINT ptDiff;
        bool result = ::GetClientRect(hWnd, &rcClient);
        YAGET_UTIL_THROW_ON_RROR(result, "GetClientRect failed.");
        result = ::GetWindowRect(hWnd, &rcWind);
        YAGET_UTIL_THROW_ON_RROR(result, "GetWindowRect failed.");
        ptDiff.x = (rcWind.right - rcWind.left) - rcClient.right;
        ptDiff.y = (rcWind.bottom - rcWind.top) - rcClient.bottom;
        return { resX + ptDiff.x, resY + ptDiff.y };
    }
std :: tuple < int , int > CalculateWindowFrame ( HWND hWnd , int resX , int resY ) { RECT rcClient , rcWind ; POINT ptDiff ; bool result = :: GetClientRect ( hWnd , & rcClient ) ; YAGET_UTIL_THROW_ON_RROR ( result , " " ) ; result = :: GetWindowRect ( hWnd , & rcWind ) ; YAGET_UTIL_THROW_ON_RROR ( result , " " ) ; ptDiff . x = ( rcWind . right - rcWind . left ) - rcClient . right ; ptDiff . y = ( rcWind . bottom - rcWind . top ) - rcClient . bottom ; return { resX + ptDiff . x , resY + ptDiff . y } ; }
return width, height of window which includes all decorations to fit canvas of resX by resY
return width height of window which includes all decorations to fit canvas of resX by resY