Solved

About flat CToolBar style

Posted on 1998-09-03
1
365 Views
Last Modified: 2013-11-20
How can I create "flat" Toolbar as in MSOffice97? In commctrl.h there is a TBSTYLE_FLAT constant but it is not work if applied as Toolbar style.
0
Comment
Question by:Scripkin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 

Accepted Solution

by:
tvgPrabhu earned 100 total points
ID: 1321716
Hi,

  Assuming that you have a CToolBar member (in your Mainframe
or wherever you are planning to host your toolbar), the following
lines of code will change your toolbar flat.

DWORD dwStyle = m_wndMyToolBar.GetStyle ();
SetWindowLong (m_wndMyToolBar.GetSafeHwnd(), GWL_STYLE,
               dwStyle | TBSTYLE_FLAT);

Alternatively, you could also do:

 m_wndMyToolBar.ModifyStyle (0, TBSTYLE_FLAT);
Note that this style cannot be applied by CToolBar's SetBarStyle
function.

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question