BCGSuite for MFC
HICON CBCGPGlobalUtils::ScaleByDPI ( HICON  hIcon,
BOOL  bDestroySourceIcon = TRUE,
BOOL  bAlphaBlend = TRUE,
const CWnd *  pWnd = NULL 
)

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

Parameters
hIconThe icon to be scaled.
bDestroySourceIconSpecifies whether the icon source icon should be destroyed.
bAlphaBlendSpecifies whether the icon has alpha channel.
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 icon.