Solved

Listview Columns - winapi

Posted on 2002-07-26
7
343 Views
Last Modified: 2006-11-17
How can you retrieve the number of columns in a listview control by using the sendmessage api? I just can't find the message anywhere.


sendmessage (listhwnd, LVM_SOMETHING, lparam, wparam


Stian




0
Comment
Question by:SiWix
7 Comments
 
LVL 49

Expert Comment

by:Ryan Chong
ID: 7179568
Why don't just try: ListView1.ColumnHeaders.Count  ?
0
 

Author Comment

by:SiWix
ID: 7179625
I found the answer,

I have to get a handle to the header control, and then use the hdr_getitemcount message to retrieve the number of columns.
0
 
LVL 1

Expert Comment

by:Computer101
ID: 7181153
I have deleted the other 3.  Would you like this PAQ'd

Computer101
E-E Moderator
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: 8040660
Hi SiWix,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Accept ryancys's comment(s) as an answer.

SiWix, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.
==========
DanRollins -- EE database cleanup volunteer
0
 

Author Comment

by:SiWix
ID: 8056797
To EE-moderator.

Ryancys's comment was not acceptable. Please do not accept his comment as answer.
0
 
LVL 49

Expert Comment

by:Ryan Chong
ID: 8061528
Since SiWix got his solution in other way round, i suggest to PAQ this question with 0 pts.

regards
0
 

Accepted Solution

by:
SpideyMod earned 0 total points
ID: 8095655
PAQ'd and points refunded

SpideyMod
Community Support Moderator @Experts Exchange
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

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

920 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

14 Experts available now in Live!

Get 1:1 Help Now