|
|
|
|
Forum
Please
Log In
to post a new message or reply to an existing one. If you are not registered, please
register.
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
Subject |
Author |
Date |
|
Vrinda Savargaonkar
|
Apr 14, 2007 - 7:36 AM
|
Dear Sir / Madam
I am using prof UIS v- 2.64 I derived a class CMyGridWndam from CExtGridWnd class. 1) My question is i don’t want to edit any row & column of grid how i can do this.
2) When i click on any row of grid i want full row highilighted like Clistcontrl style LVS_EX_FULLROWSELECT
3) How can i handle mouse single click ,double click & right click event on grid cell area ?
4) When i catch click event how i get curresponding text of that row & any column ? previously i am using Clistctrl & i want functionality like clistctrl in CExtGridWnd class.
Please provide some code or example to handle such events.
Awaiting for reply.
Thanks .
|
|
Vrinda Savargaonkar
|
Apr 16, 2007 - 6:16 AM
|
Thanks for the reply that is what i want.
|
|
Suhai Gyorgy
|
Apr 15, 2007 - 5:00 AM
|
1) How to make a particular cell read only? 2) SiwModifyStyle(__EGBS_SFB_FULL_ROWS); 3)+4) You need to make a class derived from CExtGridWnd and override this method: bool CFileGridWnd::OnGbwAnalyzeCellMouseClickEvent(
UINT nChar, // VK_LBUTTON, VK_RBUTTON or VK_MBUTTON only
UINT nRepCnt, // 0 - button up, 1 - single click, 2 - double click, 3 - post single click & begin editing
UINT nFlags, // mouse event flags
CPoint point // mouse pointer in client coordinates
)
{
bool bRes = CExtGridWnd::OnGbwAnalyzeCellMouseClickEvent(nChar, nRepCnt, nFlags, point);
CExtGridHitTestInfo htInfo;
htInfo.m_ptClient = point;
HitTest(htInfo, true, true);
if (htInfo.IsHoverInner())
{
CExtGridCell *pCell = GridCellGet(htInfo.m_nColNo, htInfo.m_nRowNo); // could use any column number instead of first parameter
ASSERT(pCell != NULL);
CString str;
pCell->TextGet(str);
}
return bRes;
}
|
|