Solved

ListView item selection

Posted on 2000-04-01
3
173 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
[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
  • 2
3 Comments
 

Expert Comment

by:load_o_crap
ID: 2676004
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
ID: 2676426
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
ID: 2694034
Thanks for ur acceptance of my answer!!!
Regards
Keshav
0

Featured Post

Independent Software Vendors: 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

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
In this post we will learn different types of Android Layout and some basics of an Android App.
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.
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…

707 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