Solved

About flat CToolBar style

Posted on 1998-09-03
1
353 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
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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

760 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now