[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Mark an row in a ListView

Posted on 2000-04-04
6
Medium Priority
?
258 Views
Last Modified: 2012-05-04
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
0
Comment
Question by:uffe_thomassen
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 

Author Comment

by:uffe_thomassen
ID: 2683647
Adjusted points from 70 to 75
0
 

Expert Comment

by:degarn
ID: 2684236
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...

0
 
LVL 15

Expert Comment

by:NickRepin
ID: 2685474
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.

0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:uffe_thomassen
ID: 2686651
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.

0
 

Accepted Solution

by:
degarn earned 300 total points
ID: 2686779
Here it comes !
You know it often happens...
Now, I oftenly use the LVS_SHOWSELALWAYS style falg so that I always have an hilighted item (when listview not focused, you see it clearely...).

0
 

Author Comment

by:uffe_thomassen
ID: 2686813
Thanks degarn,

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

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question