Sign in to follow this  
Roxypinky

[Windows Controls] How to get rid of the annoying line of top of an toolbar control

Recommended Posts

Hello everyone, Does anyone know of a trick to get rid of the line that a toolbar control draw at its top. I would have thought that settings TBstyle_TRANSPARENT would do the trick but it did nothing that I could see. Thank you, -Roxy

Share this post


Link to post
Share on other sites
Yes it is possible if you set the TBstyle_CUSTOMERASE style to override the WM_ERASEBKGND where that annoying line is most likely drawn (I've not tried that yet). I'm afraid there is no easy route :( I was hoping for a flag I could set somewhere that would take care of it for me. Alright, times to get my hand dirty in some custom drawing code :P

Thanks a lot!
-Roxy

Share this post


Link to post
Share on other sites
Alright, I knew there had to be a flag somewhere! Messing with WinSpy and the toolbars in the Windows Explorer and the reason I didn't find it in the toolbar documentation is because it's a common control style. Silly me :P. So if anyone is looking for that, the style is CCS_NODIVIDER. http://msdn.microsoft.com/en-us/library/bb775498(VS.85).aspx

Share this post


Link to post
Share on other sites
Quote:
Original post by Roxypinky
[...] it's a common control style. Silly me :P. So if anyone is looking for that, the style is CCS_NODIVIDER. http://msdn.microsoft.com/en-us/library/bb775498(VS.85).aspx

Cool. I hadn't known that existed ... and it works?

Share this post


Link to post
Share on other sites
Yep... and I guess it should work for all common controls however I can't really think of another control that has dividers like this.. maybe it has some kind of different effect on other controls.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this