J
Jimmy Blundell
Guest
I am working on an mfc application that draws two buttons on the screen relative to the dimensions of the CListBox that sits directly to the left of it. Their positions are determined by coordinates retrieved from the GetClientRect() function. However, when the CListBox contains enough data, a scroll bar will become visible, and GetClientRect() will not take the scroll bar's size into account. Therefore, my buttons end up being shifted over to the wrong place.
I am aware there is an rgstate in the SCROLLBARINFO that has information regarding the current state of the scrollbar. I haven't been successful thus far in checking this state to determine if the scroll bar is currently visible or not. My understanding of this is pretty shallow so it's likely an error on my part.
My conditional part of my code looks something like:
bool visible = true;
int info = scrollbarinfo.rgstate[0];
if (info == ((STATE_SYSTEM_INVISIBLE || STATE_SYSTEM_UNAVAILABLE))
{
visible = false;
}
My understanding on how this works must be way off. Any guidance would be much appreciated!
Continue reading...
I am aware there is an rgstate in the SCROLLBARINFO that has information regarding the current state of the scrollbar. I haven't been successful thus far in checking this state to determine if the scroll bar is currently visible or not. My understanding of this is pretty shallow so it's likely an error on my part.
My conditional part of my code looks something like:
bool visible = true;
int info = scrollbarinfo.rgstate[0];
if (info == ((STATE_SYSTEM_INVISIBLE || STATE_SYSTEM_UNAVAILABLE))
{
visible = false;
}
My understanding on how this works must be way off. Any guidance would be much appreciated!
Continue reading...