Listview Columns - winapi

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




SiWixAsked:
Who is Participating?
 
SpideyModConnect With a Mentor Commented:
PAQ'd and points refunded

SpideyMod
Community Support Moderator @Experts Exchange
0
 
Ryan ChongCommented:
Why don't just try: ListView1.ColumnHeaders.Count  ?
0
 
SiWixAuthor Commented:
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
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
Computer101Commented:
I have deleted the other 3.  Would you like this PAQ'd

Computer101
E-E Moderator
0
 
DanRollinsCommented:
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
 
SiWixAuthor Commented:
To EE-moderator.

Ryancys's comment was not acceptable. Please do not accept his comment as answer.
0
 
Ryan ChongCommented:
Since SiWix got his solution in other way round, i suggest to PAQ this question with 0 pts.

regards
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.