Solved

Listview Columns - winapi

Posted on 2002-07-26
7
347 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 51

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
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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 51

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

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

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…
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…

830 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