How to change the width of the title bar

xiaoxiao2021-03-06  110

method one:

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 Two:

Case WM_NCCALCSIZE: {BOOL BSPECIAL = FALSE; INT NEDGEWIDTH = 3; int NBarHeight = CAPTIONHEIGHT 3; int nbottomedge = 3;

IF (!) {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) {(PNC-> RGRC [2]). Left = NedgeWidth; (PNC-> RGRC [2]). Right - = NedgeWidth;} else {if (lpwndinfo-> BIM == true) {INT ImbarHeight = 17; (PNC-> RGRC [2]). Left = NedgeWidth; (PNC-> RGRC [2]). TOP = IMBARHEIGHT 3; (PNC-> RGRC [2]). Right - = NedgeWidth (PNC-> RGRC [2]). Bottom - = nbottomedge;

转载请注明原文地址:https://www.9cbs.com/read-99049.html

New Post(0)