ScrollBar Limitations
-
Hi all, right now i am working on a project in which i am using inhouse list component which is using MFC Scrollbar . problem is that when that List is filled with around 40000 records and when i am moving Tracker of and reach to the position "32768" (tracker value) it is getting reset to first position. this is happening beacuse the in the core file "wincore.cpp" (which is actually handling this event) getting parameter wParam (which is UINT ptr) and from this parameter it is actually retrieving Tracker value. wParam can contain max 2147483648 value. when tracker reaches to 32768th row its holding 2147483653 , which is beyond range of integer. Now can anyone tell me whats the solution if i have more than more than 32767 records in a single page , or is there any option in ScrollBar that can handle this situation ? Thank You , Perry
-
Hi all, right now i am working on a project in which i am using inhouse list component which is using MFC Scrollbar . problem is that when that List is filled with around 40000 records and when i am moving Tracker of and reach to the position "32768" (tracker value) it is getting reset to first position. this is happening beacuse the in the core file "wincore.cpp" (which is actually handling this event) getting parameter wParam (which is UINT ptr) and from this parameter it is actually retrieving Tracker value. wParam can contain max 2147483648 value. when tracker reaches to 32768th row its holding 2147483653 , which is beyond range of integer. Now can anyone tell me whats the solution if i have more than more than 32767 records in a single page , or is there any option in ScrollBar that can handle this situation ? Thank You , Perry
Extract from http://msdn2.microsoft.com/en-us/library/z91cdf5a(VS.80).aspx[^] The MFC Windows message handlers that indicate scroll bar position, CWnd::OnHScroll and CWnd::OnVScroll, provide only 16 bits of position data. GetScrollInfo and SetScrollInfo provide 32 bits of scroll bar position data. Thus, an application can call GetScrollInfo while processing either CWnd::OnHScroll or CWnd::OnVScroll to obtain 32-bit scroll bar position data.
-
Extract from http://msdn2.microsoft.com/en-us/library/z91cdf5a(VS.80).aspx[^] The MFC Windows message handlers that indicate scroll bar position, CWnd::OnHScroll and CWnd::OnVScroll, provide only 16 bits of position data. GetScrollInfo and SetScrollInfo provide 32 bits of scroll bar position data. Thus, an application can call GetScrollInfo while processing either CWnd::OnHScroll or CWnd::OnVScroll to obtain 32-bit scroll bar position data.
Thank you Roger .. Hope this will work ...:)