MCPcopy Create free account
hub / github.com/audiorouterdev/audio-router / Get32BitScrollPos

Method Get32BitScrollPos

audio-router-gui/ScrollHelper.cpp:304–326  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

302}
303
304int 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
328void CScrollHelper::UpdateScrollInfo()
329{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected