turasque
asked on
Problems with GetScrollInfo( )
I have an application which displays a screen with a scroll bar and I need to determine if the user has scrolled all of the way to the bottom of the scroll list. I have everything working using the "Windows XP Style" appearance Theme, but once I switch to the "Classic Windows" Theme the GetScrollInfo( ) function is returning zero values for all of the SCROLLINFO properties.
Would anyone know why GetScrollInfo( ) would return "0" for all of the SCROLLINFO properties (e.g. nMax, nPage)?
I have attached my code. The language is CA-Visual Objects, but the language should be irrelevant.
Would anyone know why GetScrollInfo( ) would return "0" for all of the SCROLLINFO properties (e.g. nMax, nPage)?
I have attached my code. The language is CA-Visual Objects, but the language should be irrelevant.
if ( xitem = SB_THUMBTRACK )
wCurrPos := HiWord( wParam )
//
// Get the current thrumb track position
//
ScrollInfo.fmask := SIF_ALL
GetScrollInfo( GetDlgItem( GetParent( hnd ), 601 ), SB_VERT, @ScrollInfo )
//
// Calculate the maximum scroll position.
//
ListBoxMaxPos := ( ( ScrollInfo.nMax - ScrollInfo.nPage ) + 1 )
//
// If the thumb track is at the bottom of the scrollbar then enable the "Yes" buttton, otherwise disable the button.
//
if ( ListBoxMaxPos == wCurrPos )
EnableWindow( GetDlgItem( GetParent( hnd ), 702 ), TRUE )
else
EnableWindow( GetDlgItem( GetParent( hnd ), 702 ), FALSE )
end
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Missed the follow-up... Have you managed to workaround these problems using C++, or do you still seek assistance here?
ASKER
I think I am all set. I am going to use my C++ solution. Thanks again for your assistance!
You're welcome. No objections here to the closing proposal ;)