MFCGridCtrl CGridCtrl ScrollBar Visible
If you change Dialog color used by OnEraseBkgnd();
you can't see CGridCtrl's ScrollBar
in that case, you should add m_Grid.SetRedraw(true, true); to OnEraseBkgnd();
BOOL CMyDialog::OnEraseBkgnd(CDC* pDC) { // TODO: 여기에 메시지 처리기 코드를 추가 및/또는 기본값을 호출합니다. CRect rect; GetClientRect(&rect); CBrush myBrush(RGB(255, 255, 255)); // dialog background color <- 요기 바꾸면 됨. CBrush *pOld = pDC->SelectObject(&myBrush); BOOL bRes = pDC->PatBlt(0, 0, rect.Width(), rect.Height(), PATCOPY); pDC->SelectObject(pOld); // restore old brush m_Grid.SetRedraw(true, true); return bRes; // return CDialog::OnEraseBkgnd(pDC); }
'Programming > MFCGridCtrl' 카테고리의 다른 글
MFCGridCtrl OnEraseBkgnd ScrollBar (0) | 2016.10.26 |
---|---|
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 |
How to Use MFC Grid control 2.27 (0) | 2016.08.12 |