Solved

ListView item selection

Posted on 2000-04-01
3
168 Views
Last Modified: 2013-11-20
How can I select a full row of a list view control in VC++5.0?
0
Comment
Question by:imtiazahmad
  • 2
3 Comments
 

Expert Comment

by:load_o_crap
Comment Utility
int nStyleEx = LVS_EX_FULLROWSELECT  |  LVS_EX_HEADERDRAGDROP;
      m_listView.SendMessage(LVM_SETEXTENDEDLISTVIEWSTYLE, nStyleEx, nStyleEx);


m_listView is the member variable of your listCtrl... this will only work if you have IE3 and above...

Remember to call CListView.GetListCtrl() first to get to the listCtrl inside the list view.

hope this helps
0
 
LVL 1

Accepted Solution

by:
kkarunakar earned 3 total points
Comment Utility
Hi there..
void ListView_SetExtendedListViewStyle(
    HWND hwndLV,
    DWORD dwExStyle
);
use this macro to select one full row in list view.
hwndLV = m_listView.m_hWnd;
of
hwndLV = m_listView.GetSafeHWnd();

and
dwExStyle = LVS_EX_FULLROWSELECT ;

This will select one full row.
Hope it will work. U r comment is welcome
Regards keshav
0
 
LVL 1

Expert Comment

by:kkarunakar
Comment Utility
Thanks for ur acceptance of my answer!!!
Regards
Keshav
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

744 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now