Changeset 1922 for trunk/src/user32/scroll.cpp
- Timestamp:
- Dec 1, 1999, 7:23:29 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/scroll.cpp
r1828 r1922 1 /* $Id: scroll.cpp,v 1.2 5 1999-11-24 18:21:37cbratschi Exp $ */1 /* $Id: scroll.cpp,v 1.26 1999-12-01 18:23:28 cbratschi Exp $ */ 2 2 /* 3 3 * Scrollbar control … … 83 83 { 84 84 Win32BaseWindow *win32wnd = Win32BaseWindow::GetWindowFromHandle(hwnd); 85 85 86 if (!win32wnd) return 0; 86 if (nBar == SB_HORZ) return Win32BaseWindow::OS2ToWin32Handle(win32wnd->getHorzScrollHandle()); 87 else return Win32BaseWindow::OS2ToWin32Handle(win32wnd->getVertScrollHandle()); 87 if (nBar == SB_HORZ) 88 return (win32wnd->getStyle() & WS_HSCROLL) ? Win32BaseWindow::OS2ToWin32Handle(win32wnd->getHorzScrollHandle()):0; 89 else 90 return (win32wnd->getStyle() & WS_VSCROLL) ? Win32BaseWindow::OS2ToWin32Handle(win32wnd->getVertScrollHandle()):0; 88 91 } 92 89 93 case SB_CTL: 90 94 return hwnd; … … 1422 1426 { 1423 1427 action = SA_SSI_HIDE; 1428 infoPtr->flags = 0; 1424 1429 goto done; 1425 1430 } … … 1630 1635 dprintf(("ShowScrollBar window not found!")); 1631 1636 SetLastError(ERROR_INVALID_WINDOW_HANDLE); 1632 return 0;1637 return FALSE; 1633 1638 } 1634 1639 … … 1663 1668 { 1664 1669 Win32BaseWindow *window = Win32BaseWindow::GetWindowFromHandle(hwnd); 1670 1665 1671 if(!window) 1666 1672 { … … 1674 1680 BOOL rc = FALSE; 1675 1681 1676 if ( nBar == SB_VERT || nBar == SB_BOTH)1682 if ((nBar == SB_VERT || nBar == SB_BOTH) && window->getStyle() & WS_VSCROLL) 1677 1683 { 1678 1684 HWND hwndScroll = Win32BaseWindow::OS2ToWin32Handle(window->getVertScrollHandle()); … … 1690 1696 } 1691 1697 } 1692 if ( nBar == SB_HORZ || (rc && nBar == SB_BOTH))1698 if ((nBar == SB_HORZ || (rc && nBar == SB_BOTH)) && window->getStyle() & WS_HSCROLL) 1693 1699 { 1694 HWND hwndScroll = Win32BaseWindow::OS2ToWin32Handle(window->get VertScrollHandle());1700 HWND hwndScroll = Win32BaseWindow::OS2ToWin32Handle(window->getHorzScrollHandle()); 1695 1701 1696 1702 infoPtr = SCROLL_GetInfoPtr(hwndScroll,SB_VERT);
Note:
See TracChangeset
for help on using the changeset viewer.