Link to home
Start Free TrialLog in
Avatar of uffe_thomassen
uffe_thomassen

asked on

Mark an row in a ListView

I have made a listview, which is only used in Reportview with fullrowselect.

My problem is to mark a specific line, as if you had clicked on it. Box around the line and changing the background colors (bit like inverting the line).

Is there anyone who knows how do that.

Kind Regards
Uffe Thomassen

I dont have any than 75 points
Avatar of uffe_thomassen
uffe_thomassen

ASKER

Adjusted points from 70 to 75
Do you want this row to be selected ?
If yes, try pMyListiew->SetItemState(iItem , LVIS_FOCUSED|LVIS_SELECTED,LVIS_FOCUSED|LVIS_SELECTED);

If you want your mark to be independant of the selection one(I don't really know what you intend to do) perhaps try the same function with LVIS_DROPHILITED rather then LVIS_SELECTED...

ListView_SetExtendedListViewStyleEx(hWin,LVS_EX_FULLROWSELECT,LVS_EX_FULLROWSELECT);

But this only works if IE3.0 is installed, that is comctl32.dll has version 4.70.

Hi Nick, degarn

Degarn has found the right function, which I have tried before, but I have found out, it was becase I didn't had focus on the ListView, Stupid me.


I think it most fair that degarn gets my points so please send an answer.

ASKER CERTIFIED SOLUTION
Avatar of degarn
degarn

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks degarn,

it was just the flag I nedded. It thats kind that, make life easy.