zoukankan      html  css  js  c++  java
  • Win32 Plus Extra Height of Caption Bar

    you set the size of the non-client area by handling the WM_NCCALCSIZE message. But don't do this unless you plan to do all of the non-client drawing as well by handling WM_NCPAINT

    Edit: here are two code fragments, one that handles WM_NCCALCSIZE and provides a simple n pixel border, and another than adds some extra pixels after DefWindowProc has done the default handling.

     1 case WM_NCCALCSIZE:
     2   {
     3   lRet = 0;
     4   const int cxBorder = 2;
     5   const int cyBorder = 2;
     6   InflateRect((LPRECT)lParam, -cxBorder, -cyBorder);
     7   }
     8 
     9 case WM_NCCALCSIZE: 
    10   {
    11   LPNCCALCSIZE_PARAMS pncc = (LPNCCALCSIZE_PARAMS)lParam;
    12   //pncc->rgrc[0] is the new rectangle
    13   //pncc->rgrc[1] is the old rectangle
    14   //pncc->rgrc[2] is the client rectangle
    15 
    16   lRet = DefWindowProc (hwnd, WM_NCCALCSIZE, wParam, lParam);
    17   pncc->rgrc[0].top += ExtraCaptionHeight;
    18   }

    You can learn a lot by passing WM_NCCALCSIZE to DefWindowProc and looking at the values of the NCCALCSIZEPARAM before and after.

  • 相关阅读:
    1)BS和CS区别
    109)PHP与oracle网址
    8)对于带有 : 的语句
    将位数较多的数字看成是字符串
    7)杂项没整理
    css中的zoom的使用
    CSS布局一
    ul和ol的一些知识
    css中的display
    css中的content的使用
  • 原文地址:https://www.cnblogs.com/gabo/p/3801268.html
Copyright © 2011-2022 走看看