比较窗口大小和客户区大小,看能否容纳下滚动条 CRect rectWnd, rectClient; GetWindowRect(&rectWnd); GetClientRect(&rectClient); if(rectWnd.Width()-rectClient.Width() >= GetSystemMetrics(SM_CXVSCROLL)) ; // 存在垂直滚动条 if(rectWnd.Height()-rectClient.Height() >= GetSystemMetrics(SM_CYHSCROLL)) ; // 存在水平滚动条