Changeset 5935 for trunk/src/user32/scroll.cpp
- Timestamp:
- Jun 9, 2001, 4:50:26 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/user32/scroll.cpp
r5769 r5935 1 /* $Id: scroll.cpp,v 1.3 8 2001-05-20 10:44:04sandervl Exp $ */1 /* $Id: scroll.cpp,v 1.39 2001-06-09 14:50:19 sandervl Exp $ */ 2 2 /* 3 3 * Scrollbar control … … 21 21 #include "oslibwin.h" 22 22 #include "initterm.h" 23 #include "pmframe.h"24 23 25 24 #define DBG_LOCALLOG DBG_scroll … … 84 83 case SB_HORZ: 85 84 case SB_VERT: 86 win32wnd = Win32BaseWindow::GetWindowFromHandle(hwnd); 87 if (!win32wnd) return NULL; 88 return win32wnd->getScrollInfo(nBar); 85 { 86 SCROLLBAR_INFO *pInfo; 87 win32wnd = Win32BaseWindow::GetWindowFromHandle(hwnd); 88 89 if (!win32wnd) return NULL; 90 pInfo = win32wnd->getScrollInfo(nBar); 91 RELEASE_WNDOBJ(win32wnd); 92 return pInfo; 93 } 89 94 90 95 case SB_CTL: … … 133 138 lprect->left--; 134 139 lprect->right++; 135 } else if (win32wnd->getStyle() & WS_VSCROLL) 140 } 141 else 142 if (win32wnd->getStyle() & WS_VSCROLL) 136 143 lprect->right++; 144 RELEASE_WNDOBJ(win32wnd); 137 145 vertical = FALSE; 138 146 break; … … 154 162 lprect->top--; 155 163 lprect->bottom++; 156 } else if (win32wnd->getStyle() & WS_HSCROLL) 164 } 165 else 166 if (win32wnd->getStyle() & WS_HSCROLL) 157 167 lprect->bottom++; 168 RELEASE_WNDOBJ(win32wnd); 158 169 vertical = TRUE; 159 170 break; … … 1492 1503 BOOL fShow /* [I] TRUE = show, FALSE = hide */) 1493 1504 { 1494 Win32BaseWindow *win32wnd = Win32BaseWindow::GetWindowFromHandle(hwnd);1495 1505 BOOL fShowH = (nBar == SB_HORZ) ? fShow : 0; 1496 1506 BOOL fShowV = (nBar == SB_VERT) ? fShow : 0; 1507 DWORD dwStyle; 1497 1508 1498 1509 dprintf(("ShowScrollBar %04x %d %d\n", hwnd, nBar, fShow)); 1499 if (!win32wnd) return FALSE; 1510 if (!IsWindow(hwnd)) return FALSE; 1511 1512 dwStyle = GetWindowLongA(hwnd, GWL_STYLE); 1500 1513 1501 1514 //CB: does Win32 send a WM_STYLECHANGED message? … … 1510 1523 if (fShow) 1511 1524 { 1512 fShowH = !( win32wnd->getStyle()& WS_HSCROLL);1513 win32wnd->setStyle(win32wnd->getStyle()| WS_HSCROLL);1525 fShowH = !(dwStyle & WS_HSCROLL); 1526 SetWindowLongA(hwnd, GWL_STYLE, dwStyle | WS_HSCROLL); 1514 1527 } 1515 1528 else /* hide it */ 1516 1529 { 1517 fShowH = ( win32wnd->getStyle()& WS_HSCROLL);1518 win32wnd->setStyle(win32wnd->getStyle()& ~WS_HSCROLL);1530 fShowH = (dwStyle & WS_HSCROLL); 1531 SetWindowLongA(hwnd, GWL_STYLE, dwStyle & ~WS_HSCROLL); 1519 1532 } 1520 1533 if( nBar == SB_HORZ ) … … 1528 1541 if (fShow) 1529 1542 { 1530 fShowV = !( win32wnd->getStyle()& WS_VSCROLL);1531 win32wnd->setStyle(win32wnd->getStyle()| WS_VSCROLL);1543 fShowV = !(dwStyle & WS_VSCROLL); 1544 SetWindowLongA(hwnd, GWL_STYLE, dwStyle | WS_VSCROLL); 1532 1545 } 1533 1546 else /* hide it */ 1534 1547 { 1535 fShowV = ( win32wnd->getStyle()& WS_VSCROLL);1536 win32wnd->setStyle(win32wnd->getStyle()& ~WS_VSCROLL);1548 fShowV = (dwStyle & WS_VSCROLL); 1549 SetWindowLongA(hwnd, GWL_STYLE, dwStyle & ~WS_VSCROLL); 1537 1550 } 1538 1551 if ( nBar == SB_VERT )
Note:
See TracChangeset
for help on using the changeset viewer.