BCGControlBar Pro for MFC
int CBCGPGlobalUtils::ScaleByDPI ( int  val,
const CWnd *  pWnd = NULL 
)

Returns the value scaled by the DPI (Dots Per Pixel) of the specified window.

Parameters
valThe value to be scaled.
pWndThe pointer to the CWnd object. If this parameter is a CWnd::wndTop address, the active (currently drawn) window will be used.
Returns
The scaled value.