{"id":39413,"date":"2004-05-10T07:00:00","date_gmt":"2004-05-10T07:00:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/oldnewthing\/2004\/05\/10\/there-are-two-types-of-scrollbars\/"},"modified":"2004-05-10T07:00:00","modified_gmt":"2004-05-10T07:00:00","slug":"there-are-two-types-of-scrollbars","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20040510-00\/?p=39413","title":{"rendered":"There are two types of scrollbars"},"content":{"rendered":"<p>Remember that there are two types of scrollbars.\n  One is the standalone scrollbar control.  This one has its own window handle, and consequently  can be given focus and all those other fun things  you can do with window handles.  To manipulate them, pass the handle to the scrollbar  control to the appropriate scrollbar function  (SetScrollInfo, for example)  and pass SB_CTL as the <i>nBar<\/i> parameter to indicate that  you have a scrollbar control.\n  The other type is the horizontal or vertical scrollbar  (or both) attached to a window by virtue of having  the WS_HSCROLL and\/or WS_VSCROLL style.  These are nonclient scrollbars and are not controls.  They are just decorations added to some other window.  You can&#8217;t give them focus since they aren&#8217;t windows  in their own right.  To manipulate them, pass the handle to the containing window  to the appropriate scrollbar function  and pass SB_HORZ or SB_VERT as the <i>nBar<\/i> parameter to indicate that  you want to manipulate the nonclient horizontal or vertical scrollbar.<\/p>\n<p>  I&#8217;m writing this down since some people seem to miss  the distinction between these two cases.  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Remember that there are two types of scrollbars. One is the standalone scrollbar control. This one has its own window handle, and consequently can be given focus and all those other fun things you can do with window handles. To manipulate them, pass the handle to the scrollbar control to the appropriate scrollbar function (SetScrollInfo, [&hellip;]<\/p>\n","protected":false},"author":1069,"featured_media":111744,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[25],"class_list":["post-39413","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-code"],"acf":[],"blog_post_summary":"<p>Remember that there are two types of scrollbars. One is the standalone scrollbar control. This one has its own window handle, and consequently can be given focus and all those other fun things you can do with window handles. To manipulate them, pass the handle to the scrollbar control to the appropriate scrollbar function (SetScrollInfo, [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/39413","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/users\/1069"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/comments?post=39413"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/39413\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media\/111744"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media?parent=39413"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=39413"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=39413"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}