• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 658
  • Last Modified:

How to add buttons to ClistCtrl on top of header?

Hi,
How to addbuttons to ClistCtrl on top of header?
0
srikadi
Asked:
srikadi
  • 5
  • 4
1 Solution
 
DanRollinsCommented:
Do you want to make the header control so that when you click any of the column headers, something happens (for instance, sort the column)?  Or are you talking about additional buttons?
0
 
srikadiAuthor Commented:
yes, i want to add extra buttons...
0
 
DanRollinsCommented:
It would be difficult to add new buttons to the control itself.  
Why not add them to the dialog box (or other window) in which the control resides?
0
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!

 
srikadiAuthor Commented:
i can add buttons to any CDilaogBar but it should reside in CListView ie on top of CHeaderctl in CListView.
Please find the attached sample..

Doc2.doc
0
 
DanRollinsCommented:
One way to handle this is to make the right-side window as a CFormView.  Then make your ListView window as an item in the form (just add it via the Dialog Editor).  That way yu can put buttons, edit controls, sliders, whaytever all around it -- below it or, even above it.  The attached screen shot shows how that would look.

sdi03.JPG
0
 
srikadiAuthor Commented:
Hi,
I did  same thing but the items are not coming up to show the user in the  CListView..but the items are adding to CListView& database..
0
 
DanRollinsCommented:
I do not understand your last post.
Are you using a database to populate the list?  If so, then just populate the list the same way, but use the CListCtrl control that is in the CFormView rather than the one that is in CListView.
0
 
srikadiAuthor Commented:
k..thanx for ur help..y its not possible with CLIstView?..i already have CLIstView class so..i want to make use of that..
0
 
DanRollinsCommented:
Use CListView::GetListCtrl() to optain a pointer to the CListCtrl.  It is derived from CWnd, so you can, for instance, move and resize it.   Then you can add controls above it.
I would not recommend this technique as it is perhaps more complicated than my other suggestion.
0

Featured Post

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.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now