Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

copy value of cell when mouse clicks on cell (msflexgrid)

Status
Not open for further replies.

nbgoku

Programmer
May 25, 2004
108
US
how do i make it so that a cell gets selected and the person can copy (only, no editing) the string in the cell in a msflexgrid
 
I had such a case in another grid and I solved so:
Code:
BOOL CMyClass::OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult) 
{
	if (wParam == IDC_MTMB_GRID && ((NM_GRIDVIEW*)lParam)->hdr.code == NM_RCLICK) {
		if (((NM_GRIDVIEW*)lParam)->iColumn == 7) {
		[COLOR=green]//here do something[/color]
		......
	}
}

Here [tt]IDC_MTMB_GRID[/tt] - my Grid
[tt]NM_GRIDVIEW[/tt] - astructure that is send if user clicks on the grid. It has a sructure [tt]hdr[/tt], a member [tt]iColumn[/tt] and some other members.

I'm sure if you look in the docu for msflexgrid you'll find something like that.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top