Вверх ↑
Ответов: 5446
Рейтинг: 323
#1: 2007-12-22 23:33:45 ЛС | профиль | цитата
Про GetScrollInfo - вот что пишет дядя Билли:
MSDN:GetScrollInfo писал(а):

To get the 32-bit position of the scroll box (thumb) during a SB_THUMBTRACK request code in a WM_HSCROLL or WM_VSCROLL message, call GetScrollInfo with the SIF_TRACKPOS value in the fMask member of the SCROLLINFO structure. The function returns the tracking position of the scroll box in the nTrackPos member of the SCROLLINFO structure. This allows you to get the position of the scroll box as the user moves it. The following sample code illustrates the technique.

#cpp
SCROLLINFO si;
case WM_HSCROLL:
switch(LOWORD(wparam)) {
case SB_THUMBTRACK:
// Initialize SCROLLINFO structure

ZeroMemory(&si, sizeof(si));
si.cbSize = sizeof(si);
si.fMask = SIF_TRACKPOS;

// Call GetScrollInfo to get current tracking
// position in si.nTrackPos

if (!GetScrollInfo(hwnd, SB_HORZ, &si) )
return 1; // GetScrollInfo failed
break;
.
.
.
}


То бишь - обязуется, но только если попросим правильно (c SIF_TRACKPOS, а не с SIF_POS).

Последний пассаж про "правильных пацанов" несколько не очень понял.
карма: 1

0