Tech Support > Microsoft Windows > Development Resources > standard scrollbars mdi
standard scrollbars mdi
Posted by bobocpp on February 16th, 2005


how can i get the rect of a standard scrollbar and how can i determine
if the scrollbar appears or disappears ?

Posted by Damian Driscoll on February 16th, 2005


bobocpp wrote:

GetSystemMetrics(SM_CXVSCROLL) (or SM_CYHSCROLL)
and
ShowScrollBar()
--
Damian

Posted by bobocpp on February 17th, 2005


Damian Driscoll <me@privacy.net> wrote in message news:<cuvi85$7du$1$8302bc10@news.demon.co.uk>...
Thanks for your answer, but i don`t want to know how i can show or
hide the scrollbars by myself. I want to know how i can see if the
scrollbar is shown or hidden. GetSystemMetrics was a good tip.
Excuse me for my poor english.

Posted by Damian Driscoll on February 17th, 2005


bobocpp wrote:

OK:

LONG wStyle = GetWindowLong(hwnd,GWL_STYLE);
int HasHScroll = ((wStyle & WS_HSCROLL) == WS_HSCROLL);
int HasVScroll = ((wStyle & WS_VSCROLL) == WS_VSCROLL);

if(HasHScroll)
printf("Window has a horizontal scroll bar\n");
if(HasVScroll)
printf("Window has a vertical scroll bar\n");

--
Damian


Similar Posts