Type MARGINS
cxLeftWidth As Long
cxRightWidth As Long
cyTopHeight As Long
cyBottomHeight As Long
End Type
Extends the window frame into the client area'
DwmExtendFrameIntoClientArea(hWnd, ByRef
(MARGINS
-------------------------------------------------------------
if (m.Msg=&H83 And WParam=1) Then
Dim nccsp As NCCALCSIZE_PARAMS
nccsp.rect0.Top+=30;
nccsp.rect0.Bottom+= -8;
nccsp.rect0.Left+= 8;
nccsp.rect0.Right += -8;
Ret=0
( else if m.Msg=&H84 And (Ret=0
(Ret=HitTestNCA(HWnd,WParam, LParam
else
(base.WndProc(ref m
End if
(private HitTestNCA(hwnd,wparam,lparam
HTNOWHERE=0;
int HTCLIENT=1;
int HTCAPTION=2;
int HTMINBUTTON=8;
int HTMAXBUTTON=9;
int HTLEFT=10;
int HTRIGHT=11;
int HTTOP=12;
int HTTOPLEFT=13;
int HTTOPRIGHT=14
int HTBOTTOM=15;
int HTBOTTOMLEFT=16;
int HTBOTTOMRIGHT=17;
'Getting the point where the mouse clicked...
Dim p As POINT
(p.x=LoWord(lparam
(p.y=HiWord(lparam
'The ClientToScreen function converts 'the client-area'
coordinates of a specified 'point to screen coordinates
ClientToScreen hwnd,pt'
'The PtInRect function determines 'whether the'
specified point lies within 'the specified rectangle. A point is within 'a rectangle if it lies on the left or top side 'or is within all four sides. A point on the 'right or bottom side is considered 'outside the rectangle
(Ret=PtInRect(rc,nccsp.rect0'
Rectangle hdc,left,top,right,bottom'
(topleft=Rectangle(hdc,0, 0, 8, 8
if (topleft.Contains(p)) Then
(return=IntPtr(HTTOPLEFT
(topright=Rectangle(hdc,Width-8,0,8,8
if (topright.Contains(p)) Then
(Ret=IntPtr(HTTOPRIGHT
(botleft=Rectangle(hdc,0,Height-8,8,8
if (botleft.Contains(p)) Then
(Ret=IntPtr(HTBOTTOMLEFT
(botright=Rectangle(hdc,Width-8,Height-8,8, 8
if (botright.Contains(p)) Then
(Ret=IntPtr(HTBOTTOMRIGHT
(top=Rectangle(hdc,0,0,Width,8
if (top.Contains(p)) Then
(Ret=IntPtr(HTTOP
(cap=Rectangle(hdc,0,8,Width,38-8
if (cap.Contains(p)) Then
(Ret=IntPtr(HTCAPTION
(left=Rectangle(hdc,0,0,8,Height
if (left.Contains(p)) Then
(Ret=IntPtr(HTLEFT
(right=Rectangle(hdc,Width-8,0,8,Height
if (right.Contains(p)) Then
(Ret=IntPtr(HTRIGHT
(bottom=Rectangle(hdc,0,Height-8,Width, 8
if (bottom.Contains(p)) Then
(Ret=IntPtr(HTBOTTOM