?
Solved

ListView item selection

Posted on 2000-04-01
3
Medium Priority
?
175 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 9 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

762 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