| 302 | } |
| 303 | |
| 304 | int CScrollHelper::Get32BitScrollPos(int bar, CScrollBar* pScrollBar) |
| 305 | { |
| 306 | // Code below is from MSDN Article ID 152252, "How To Get |
| 307 | // 32-bit Scroll Position During Scroll Messages". |
| 308 | |
| 309 | // First determine if the user scrolled a scroll bar control |
| 310 | // on the window or scrolled the window itself. |
| 311 | ASSERT( m_attachWnd != NULL ); |
| 312 | HWND hWndScroll; |
| 313 | if ( pScrollBar == NULL ) |
| 314 | hWndScroll = m_attachWnd->m_hWnd; |
| 315 | else |
| 316 | hWndScroll = pScrollBar->m_hWnd; |
| 317 | |
| 318 | SCROLLINFO si; |
| 319 | si.cbSize = sizeof(SCROLLINFO); |
| 320 | si.fMask = SIF_TRACKPOS; |
| 321 | ::GetScrollInfo(hWndScroll, bar, &si); |
| 322 | |
| 323 | int scrollPos = si.nTrackPos; |
| 324 | |
| 325 | return scrollPos; |
| 326 | } |
| 327 | |
| 328 | void CScrollHelper::UpdateScrollInfo() |
| 329 | { |
nothing calls this directly
no outgoing calls
no test coverage detected