How to Use MFC Grid control 2.27
http://www.codeproject.com/Articles/8/MFC-Grid-control-2-27
1. Download
MFC Grid control 2.27
2. Essential Include Files
Files
To use the Grid control in your project you will need to add a number of files to your project:
gridctrl.cpp, gridctrl.h
Main grid control source and header files. gridcellbase.cpp, gridcellbase.h
Main grid cell base class. gridcell.cpp, gridcell.h
Main grid cell default class implementation. CellRange.h
Definition of CCellID and CCellRange helper classes. MemDC.h
Keith Rule's memory DC helper class. InPlaceEdit.cpp, InPlaceEdit.h
In-place edit windows source and header files. GridDropTarget.cpp, GridDropTarget.h
Grid control OLE drag and drop target. Only necessary if you don't define GRIDCONTROL_NO_DRAGDROP in gridctrl.h Titletip.cpp, Titletip.h
Titletips for cells, from Zafir Anjum. Only necessary if you don't define GRIDCONTROL_NO_TITLETIPS in gridctrl.h
3. Essential Include Files Add to Project
4. Custom Control Add to Dialog
ID : IDC_GRID
Class : MFCGridCtrl (No CGridCtrl)
if you use CGridCtrl, you can see this error
5. Make Member Variable m_Grid
Dlg.h
- Include
#include "GridCtrl.h"
- Make Member Variable m_Grid
CGridCtrl m_Grid;
Dlg.cpp
- Include
#include "GridCtrl.h"
6. IDC_GRID Connect with Member Variable
DDX_GridControl(pDX, IDC_GRID, m_Grid);
DDX_GridControl Function defined in GridCtrl.h
'Programming > MFCGridCtrl' 카테고리의 다른 글
MFCGridCtrl CGridCtrl ScrollBar Visible (0) | 2016.10.24 |
---|---|
MFC CGridCtrl Color Change (0) | 2016.10.20 |
MFC Grid control 2.27 DragAndDrop Error (0) | 2016.09.12 |
MFC Grid control 2.27 ReadOnly, CheckBox Button (0) | 2016.08.12 |
MFC Dialog 에 OnInitDialog 추가하기 (0) | 2016.08.10 |