Method 1:
Nonclientmetrics NCM;
NCM. cbsize = sizeof (nonclientmetrics );
: Systemparametersinfo (spi_getnonclientmetrics,
Sizeof (nonclientmetrics ),
& NCM,
0
);
NCM. lfcaptionfont. lfheight =-300;
: Systemparametersinfo (spi_setnonclientmetrics,
Sizeof (nonclientmetrics ),
& NCM,
Spif_sendchange
);
Method 2:
Case wm_nccalcsize:
{
Bool bspecial = false;
Int nedgewidth = 3;
Int nbarheight = captionheight + 3;
Int nbottomedge = 3;
If (! (Bool) wparam)
{
Rect rtsave;
Copyrect (& rtsave, (lprect) lparam );
//: Callwindowproca (lpwndinfo-> pwndproc, hwnd, umsg, wparam, lparam );
If (lpwndinfo-> Bim = true)
{
Int imbarheight = 17;
Rtsave. Left + = nedgewidth;
Rtsave. Top + = imbarheight + 3;
Rtsave. Right-= nedgewidth;
Rtsave. Bottom-= nbottomedge;
}
Else
{
Rtsave. Left + = nedgewidth;
Rtsave. Top + = nbarheight;
Rtsave. Right-= nedgewidth;
Rtsave. Bottom-= nbottomedge;
}
Copyrect (lprect) lparam, & rtsave );
* Lresult = 0;
: Releasedc (hwnd, HDC );
Return true;
}
Else
{
Rect rtsave;
Lprect prtclt;
Lpnccalcsize_params PNC;
PNC = (lpnccalcsize_params) lparam;
Prtclt = & (PNC-> rgrc [0]);
Copyrect (& rtsave, prtclt );
Copyrect (& (PNC-> rgrc [2]), & (PNC-> rgrc [1]);
If (bsysdlg)
{< br> (PNC-> rgrc [2]). left + = nedgewidth;
(PNC-> rgrc [2]). right-= nedgewidth;
}< br> else
{< br> If (lpwndinfo-> Bim = true)
{< br> int imbarheight = 17;
(PNC-> rgrc [2]). left + = nedgewidth;
(PNC-> rgrc [2]). top + = imbarheight + 3;
(PNC-> rgrc [2]). right-= nedgewidth;
(PNC-> rgrc [2]). bottom-= nbottomedge;
rtsave. left + = nedgewidth;
rtsave. top + = imbarheight + 3;
rtsave. right-= nedgewidth;
rtsave. bottom-= nbottomedge;
}< br> else
{< br> (PNC-> rgrc [2]). left + = nedgewidth;
(PNC-> rgrc [2]). top + = nbarheight;
(PNC-> rgrc [2]). right-= nedgewidth;
(PNC-> rgrc [2]). bottom-= nbottomedge;
// result =: callwindowproca (lpwndinfo-> pwndproc, hwnd, umsg, wparam, lparam );
// prtclt = & (PNC-> rgrc [0]);
rtsave. left + = nedgewidth;
rtsave. top + = nbarheight;
rtsave. right-= nedgewidth;
rtsave. bottom-= nbottomedge;
}< BR >}< br> copyrect (prtclt, & rtsave);
* lresult = 0;
:: releasedc (hwnd, HDC);
return true;
}< br> break;
}