Public Type Margins
cyTopHeight As Long
cxLeftWidth As Long
cyBottomHeight As Long
cxRightWidth As Long
End Type
Private dwmMargins As MARGINS
' Adjust (shrink) the client rectangle to accommodate'
the border'
'about rgrc --> 0 new 1 old 2 window 'client rectangle '
'before moved or resized '
nccsp.rgrc0.Top=0
nccsp.rgrc0.Bottom= 0
nccsp.rgrc0.Left=0
nccsp.rgrc0.Right=0
dwmMargins.cyTopHeight=nccsp.rgrc0.Top-nccsp.rgrc0.Top
dwmMargins.cxLeftWidth=nccsp.rgrc0.Left-nccsp.rgrc0.Left
dwmMargins.cyBottomHeight=nccsp.rgrc0.Bottom-nccsp.rgrc0.Bottom
dwmMargins.cxRightWidth=nccsp.rgrc0.Right-nccsp.rgrc0.Right
WVR_VALIDRECTS0x0400
This value indicates that, upon return from WM_NCCALCSIZE, the rectangles specified by the rgrc[1] and rgrc[2] members of the NCCALCSIZE_PARAMSstructure contain valid destination and source area rectangles
(cxfr=GetSystemMetrics(SM_CXSIZEFRAME
(cyfr= GetSystemMetrics(SM_CYSIZEFRAME
InflateRect lpncsp.rgrc,cxfr-1,cyfr-1
The InflateRect function increases or decreases the
.width and height of the specified rectangle