Search

'GridCtrl'에 해당되는 글 3건

  1. 2016.10.20 MFC CGridCtrl Color Change
  2. 2016.08.12 MFC Grid control 2.27 ReadOnly, CheckBox Button
  3. 2016.08.12 How to Use MFC Grid control 2.27

MFC CGridCtrl Color Change

Programming/MFCGridCtrl 2016. 10. 20. 15:09 Posted by TanSanC
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

MFC CGridCtrl Color Change




 





COLORREF ItemBkColour = RGB(255,255,255);

m_Grid.SetItemBkColour(0, 0, ItemBkColour);

m_Grid.SetItemBkColour(0, 1, ItemBkColour);

m_Grid.SetItemBkColour(0, 2, ItemBkColour);

m_Grid.SetItemBkColour(0, 3, ItemBkColour);






m_Grid.SetBkColor(RGB(255, 0, 0)); 






336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

MFC Grid control 2.27 ReadOnly, CheckBox Button





// Make cell row,col read-only

m_Grid.SetItemState(row, col, m_Grid.GetItemState(row, col) | GVIS_READONLY);





// Make cell row,col CheckBox Button

m_Grid.SetCellType(row, col, RUNTIME_CLASS(CGridCellCheck));











http://www.codeproject.com/Articles/8/MFC-Grid-control-2-27

How to Use MFC Grid control 2.27

Programming/MFCGridCtrl 2016. 8. 12. 16:13 Posted by TanSanC
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.

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

6 May 2010 CPOL
A fully featured MFC grid control for displaying tabular data. The grid is a custom control derived from CWnd





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.hMain grid control source and header files.
gridcellbase.cpp, gridcellbase.hMain grid cell base class.
gridcell.cpp, gridcell.hMain grid cell default class implementation.
CellRange.hDefinition of CCellID and CCellRange helper classes.
MemDC.hKeith Rule's memory DC helper class.
InPlaceEdit.cpp, InPlaceEdit.hIn-place edit windows source and header files.
GridDropTarget.cpp, GridDropTarget.hGrid 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