scrolling

From: Pele (pele_at_kotnet.org)
Date: 11/19/03


Date: Wed, 19 Nov 2003 17:37:42 +0100

Hello,

I want to go through an entire listbox - using the winapi - by scrolling one
line down at the time. However, the box or scroll seems to get stuck each
time after item 44. Does anyone have an idea what might cause this? This is
my code::

   for(int i=1;i<97016;i++)
   {
        cout << i << "\n";
        HWND index = GetWindowNumber(tophandle,2000); // own method to find
right handle
        long lParam = MAKELPARAM(SB_LINEDOWN,NULL);
        SendMessage(index,WM_VSCROLL,lParam,NULL);
        Sleep(2000); // not really necessary, but easier to overlook this
way
   }

Thanks,

Joris