Solved

How to add buttons to ClistCtrl on top of header?

Posted on 2008-10-27
9
641 Views
Last Modified: 2013-11-20
Hi,
How to addbuttons to ClistCtrl on top of header?
0
Comment
Question by:srikadi
  • 5
  • 4
9 Comments
 
LVL 49

Expert Comment

by:DanRollins
ID: 22820422
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
 

Author Comment

by:srikadi
ID: 22821707
yes, i want to add extra buttons...
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 22826975
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
 

Author Comment

by:srikadi
ID: 22828305
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 49

Expert Comment

by:DanRollins
ID: 22828978
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
 

Author Comment

by:srikadi
ID: 22830699
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
 
LVL 49

Expert Comment

by:DanRollins
ID: 22845955
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
 

Author Comment

by:srikadi
ID: 22850195
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
 
LVL 49

Accepted Solution

by:
DanRollins earned 500 total points
ID: 22853319
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Expand data scrubbing tool 13 32
deburging in oracle form 12 87
My project did see openJDK that I installed. What could be the problem 7 121
Message not shown 5 27
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

932 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

11 Experts available now in Live!

Get 1:1 Help Now