본문 바로가기
C & C++/MFC BCG 컨트롤

[Grid] BCG Grid Ctl 이벤트 모음

by izen8 2011. 4. 14.
반응형


////////////////////////////////////////////////////////////////////

const DWORD dwViewStyle = WS_CHILD | WS_VISIBLE;
CRect rcTmp;
CBCGPGridRow* pRow;
CString strTmp;

m_staticFileAntPatternHoriListLoc.GetClientRect(&rcTmp); 
m_staticFileAntPatternHoriListLoc.MapWindowPoints(this, &rcTmp);

m_listFileAntPatternHoriList = NULL;

m_listFileAntPatternHoriList = new CCellTypesGridCtrl();
if (!m_listFileAntPatternHoriList->Create (dwViewStyle, rcTmp, this, IDC_LIST_FILE_ANT_PATTERN_HORI_LIST))
{
 TRACE0("Failed to create workspace view\n");
 return ;      // fail to create
}

m_listFileAntPatternHoriList->SetWholeRowSel (FALSE);
m_listFileAntPatternHoriList->EnableMarkSortedColumn (FALSE);
m_listFileAntPatternHoriList->EnableHeader (TRUE, BCGP_GRID_HEADER_SELECT);
m_listFileAntPatternHoriList->EnableRowHeader (TRUE);
m_listFileAntPatternHoriList->SetClearInplaceEditOnEnter (FALSE);
m_listFileAntPatternHoriList->EnableInvertSelOnCtrl ();
m_listFileAntPatternHoriList->InsertColumn (0, _T("각도[º]"),50);
m_listFileAntPatternHoriList->InsertColumn (1, _T("상대 이득[dB]"), 90);

////////////////////////////////////////////////////////////////////

m_listScenarioOpenList->SetNormalGridCtrl(this);


afx_msg LRESULT OnClicklistStationList(WPARAM wParam,LPARAM lParam);  
// 키보드 상하 이동이벤트


ON_MESSAGE(dfGRID_KEYUP_EVENT, &CDlgAntennaMng::OnClicklistStationList)


LRESULT CDlgAntennaMng::OnClicklistStationList(WPARAM wParam,LPARAM lParam)
{

}

////////////////////////////////////////////////////////////////////

afx_msg LRESULT OnlistAntennaMngListClick(WPARAM wParam,LPARAM lParam);  
// 그리드 컨트롤 클릭시 이벤트 발생


ON_MESSAGE(WM_USER + 200, &CDlgAntennaMng::OnlistAntennaMngListClick)


LRESULT CDlgAntennaMng::OnlistAntennaMngListClick(WPARAM wParam,LPARAM lParam)
{

}

////////////////////////////////////////////////////////////////////

afx_msg LRESULT BtnModifyGrid(WPARAM wParam,LPARAM lParam);   
// 그리드 수정후 차트 변경되는 이벤트 발생

ON_MESSAGE(WM_USER + 11, &CDlgFileAntPattern::BtnModifyGrid)   
//  Grid ctrl 수정시 이벤트 발생

LRESULT CDlgFileAntPattern::BtnModifyGrid(WPARAM wParam,LPARAM lParam)
{

}

////////////////////////////////////////////////////////////////////

반응형

'C & C++ > MFC BCG 컨트롤' 카테고리의 다른 글

[ContextMenu]동적으로 콘텍스트 메뉴 생성  (0) 2012.07.23

댓글