switch (nSBCode) { case SB_THUMBTRACK: //拖动滚动块 ScrollWindow(-(nPos-pos),0); SetScrollPos(SB_HORZ,nPos); break; case SB_LINELEFT : //单击左箭头 if (pos != 0) { ScrollWindow(1,0); SetScrollPos(SB_HORZ,pos-1); } break; case SB_LINERIGHT: //单击右箭头 if (pos+thumbwidth