代码贴上CRect ret;
RECT rtMain; this->GetClientRect(&rtMain);
int iHigh = rtMain.bottom - 38;
ret.top = rtMain.top + 50;
ret.left = rtMain.left + 10;
ret.right = rtMain.right - 150;
ret.bottom = ret.top + iHigh / 2; m_wnd.Create(NULL ,_T("wind") ,WS_CHILD|WS_VISIBLE|WS_HSCROLL|WS_VSCROLL ,ret ,this ,0);怎么改变VSCROLL和HSCROLL的大小。
不是位置哦。不是这个函数SetScrollInfo

解决方案 »

  1.   

    SetScrollInfo The SetScrollInfo function sets the parameters of a scroll bar, including the minimum and maximum scrolling positions, the page size, and the position of the scroll box (thumb). The function also redraws the scroll bar, if requested.
      

  2.   

    窗口自带的滚动条大小是固定的。如果你想修改的话,要自己手动创建自己的滚动条了。比如vc6的文本编译器的滚动条就是自己添加的。
    而notepad的滚动条就是窗口本身具有的。
    你可以用spy++查看以下就知道了
      

  3.   

    改变控件的宽度?hook后根据获得宽度除2画出来~
      

  4.   

    修改系统非客户区属性可以修改滚动条大小  NONCLIENTMETRICS NonClientMetrics = {0};
      NonClientMetrics.cbSize = sizeof(NonClientMetrics);  if(!SystemParametersInfo(
        SPI_GETNONCLIENTMETRICS, 
        sizeof(NonClientMetrics),  &NonClientMetrics, 0))
      {
        DWORD dwErr = GetLastError();
        ASSERT(0);
      }  NonClientMetrics.iScrollWidth  = 12;
      NonClientMetrics.iScrollHeight = 12;  if(!SystemParametersInfo(
        SPI_SETNONCLIENTMETRICS,
        sizeof(NonClientMetrics), &NonClientMetrics,
        SPIF_SENDWININICHANGE))
      {
        DWORD dwErr = GetLastError();
        ASSERT(0);
      }