combobox_flatcombo_src.zip
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 theCCJFlatComboBox
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
.Example
Below is and example of how you might add the control to your project.
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, and for his auto-completion code. 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().
댓글 없음:
댓글 쓰기