CodeGuru
Earthweb Search
Forums Wireless Jars Gamelan Developer.com
CodeGuru Navigation
RSS Feeds

RSSAll

RSSVC++/C++

RSS.NET/C#

RSSVB

See more EarthWeb Network feeds

follow us on Twitter

Member Sign In
User ID:
Password:
Remember Me:
Forgot Password?
Not a member?
Click here for more information and to register.

Become a Marketplace Partner

jobs.internet.com

internet.commerce
Partners & Affiliates
















Home >> Visual C++ / C++ >> Controls >> ComboBox


Office Style Flat ComboBox
Rating: none

Kirk Stowell (view profile)
July 19, 1999

.
For the latest updates and source code click here.


(continued)



Office Style Flat ComboBox Demo

Environment: VC5, VC6, WIN9x, NT4

This control easily gives your application the Flat Look that is seen in the Microsoft office products. To use the control, simply add the files CCJFlatComboBox.cpp and CCJFlatComboBox.h to your project. You can use Class Wizard to add the CCJFlatComboBox member variables ( you most likely will have to rebuild the .clw file associated with your project ), or just replace any instance of CComboBox, with CCJFlatComboBox. Below is and example of how you might approach this.

Header file:

//{{AFX_DATA(CFlatComboDemoDlg)
enum { IDD = IDD_FLATCOMBODEMO_DIALOG };
CCJFlatComboBox m_DDCombo;
//}}AFX_DATA

Implementation file:

//{{AFX_DATA_MAP(CFlatComboDemoDlg)
DDX_Control(pDX, IDC_DROPDOWN_COMBO, m_DDCombo);
//}}AFX_DATA_MAP

Acknowledgements

  • Chris Maunder - For letting me use his color picker class. I made some modifications to the appearance of the control that is used in this demo. My modifications are noted.
  • Gilberto Botaro - For his help with adding auto completion to the CCJFlatComboBox class.
  • Vachik Hovhannissian and Danilo Lax - For help with fixing focus and message handling bugs.
  • Yosh Yamashita - For help with fixing accelerator bug.
  • Shannon McCoy - For suggestions on using ::GetSysColor(...) and ::GetSystemMetrics(...) more efficiently.
  • Todd Brannam - For help with fixing offset bug to use GetSystemMetrics().

Downloads

Download demo project - 46 Kb
Download source - 6 Kb

Tools:
Add www.codeguru.com to your favorites
Add www.codeguru.com to your browser search box
IE 7 | Firefox 2.0 | Firefox 1.5.x
Receive news via our XML/RSS feed







RATE THIS ARTICLE:   Excellent  Very Good  Average  Below Average  Poor  

(You must be signed in to rank an article. Not a member? Click here to register)

Latest Comments:
How to use the control in a DialogBar ??? - Legacy CodeGuru (11/13/2002)
Adding large number of records in sorted combobox - Legacy CodeGuru (06/21/2002)
*** WARNING *** This stuff is dangerous! - Legacy CodeGuru (12/12/2001)
BUG in CCJFlatComboBox::DrawCombo() - Legacy CodeGuru (12/06/2000)
Office style Combo : auto-incomplete - Legacy CodeGuru (11/29/1999)

View All Comments
Add a Comment:
Title:
Comment:
Pre-Formatted: Check this if you want the text to display with the formatting as typed (good for source code)



(You must be signed in to comment on an article. Not a member? Click here to register)

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Whitepapers and eBooks

Intel Whitepaper: Comparing Two- and Four-Socket Platforms for Server Virtualization
IBM Solutions Brief: Go Green With IBM System xTM And Intel
HP eBook: Simplifying SQL Server Management
IBM Contest: Are You the Next Superstar? Join the "Search for the XML Superstar" Contest to Find Out
Microsoft PDF: Top 10 Reasons to Move to Server Virtualization with Hyper-V
Microsoft PDF: Six Reasons Why Microsoft's Hyper-V Will Overtake Vmware
Microsoft Step-by-Step Guide: Hyper-V and Failover Clustering
Intel PDF: Quad-Core Impacts More Than the Data Center
Intel PDF: Virtualization Delivers Data Center Efficiency
Go Parallel Article: PDC 2008 in Review
Microsoft PDF: Top 11 Reasons to Upgrade to Windows Server 2008
Avaya Article: Communication-Enabled Mashups: Empowering Both Business Owners and IT
Intel Whitepaper: Building a Real-World Model to Assess Virtualization Platforms
  PDF: Intel Centrino Duo Processor Technology with Intel Core2 Duo Processor
Microsoft Article: Build and Run Virtual Machines with Hyper-V Server 2008
Go Parallel Article: Q&A with a TBB Junkie
IBM Whitepaper: Innovative Collaboration to Advance Your Business
Internet.com eBook: Real Life Rails
IBM eBook: The Pros and Cons of Outsourcing
Internet.com eBook: Best Practices for Developing a Web Site
IBM CXO Whitepaper: The 2008 Global CEO Study "The Enterprise of the Future"
Avaya Article: Call Control XML in Action - A CCXML Auto Attendant
IBM CXO Whitepaper: Unlocking the DNA of the Adaptable Workforce--The Global Human Capital Study 2008
Adobe Acrobat Connect Pro: Web Conferencing and eLearning Whitepapers
HP eBook: Guide to Storage Networking
MORE WHITEPAPERS, EBOOKS, AND ARTICLES