The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: Farabi on February 26, 2005, 05:06:17 AM

Title: Creating scroll bars
Post by: Farabi on February 26, 2005, 05:06:17 AM
How to do it?
If I use BitBlt will the scrollbars picture overwriten? :dazzled:
Title: Re: Creating scroll bars
Post by: petezl on February 26, 2005, 11:11:55 AM
You need to Post the code. There are two routes. Standard scrollbars and custom ones. Standard scroll bars more or less look after themselves, you just need to intercept the messages. Custom scrollbars have to be created and placed by the app. The picture control then has to be positioned so as not to overlap either the scolls or anything else in the client window, such as Statusbars and toolbars.
Hope this helps!
Peter.
Title: Re: Creating scroll bars
Post by: Farabi on February 26, 2005, 12:32:40 PM
Quote from: petezl on February 26, 2005, 11:11:55 AM
You need to Post the code. There are two routes. Standard scrollbars and custom ones. Standard scroll bars more or less look after themselves, you just need to intercept the messages. Custom scrollbars have to be created and placed by the app. The picture control then has to be positioned so as not to overlap either the scolls or anything else in the client window, such as Statusbars and toolbars.
Hope this helps!
Peter.

Thanks I undestand a bit. So if I use Bitblt I can overwrite the picture.
Title: Re: Creating scroll bars
Post by: petezl on February 26, 2005, 01:29:31 PM
I had no reason to use them until recently. There is a nice C article herehttp://www.codeproject.com/bitmap/bmpscroll.asp
and of course some stuff at MSDN.
I must admit, I found some peculiarities when messing around with the ScrollInfo structure. You really need to make a scroll test app and explore all the messages and how they work, it gets quite involved if you use non system scrollbars.
Peter