473,386 Members | 1,786 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Getting number of columns in ListView

tbarto
19
Hi

For some time I've been working on an application that may be able to find a specified item in ListView ( WinAPI ). It is possible to get some item using e.g LVM_GETITEM message and LVITEM structure. My question is: Do You know any way to get a number of columns in a ListView? Is there any specified message?

Thank You
Feb 22 '07 #1
1 4706
tbarto
19
Hi

For some time I've been working on an application that may be able to find a specified item in ListView ( WinAPI ). It is possible to get some item using e.g LVM_GETITEM message and LVITEM structure. My question is: Do You know any way to get a number of columns in a ListView? Is there any specified message?

Thank You
I have found a solution, but just FYI if somebody experiences a similar problem. It is necessary to use LVM_GETCOLUMN message and LPLVCOLUMN structure. Then You need to use SendMessage with LVM_GETCOLUMN and a ref to LPLVCOLUMN. Go "right" through the list and increment a counter of columns until SendMessage returns - 1.
Feb 26 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Samuel R. Neff | last post by:
I'm having a index problem with ListView SubItems. If I add multiple columns to the listview and then add items with associated subitems, the ListView displays fine. Then if I delete a column via...
5
by: objectref | last post by:
Hi to all, i populate a ListView with data from a datareader and i just want to know the column name of the cell that the user clicks on. E.x., if the user clicks on the 2nd column, 3rd row in...
0
by: CR | last post by:
I'm having a problem with the Listview control. I populated a Listview with 4 columns. On my PC they show up just fine, the right hand edge of the 4th column lines up with the right hand edge of...
2
by: billyb | last post by:
My listview has two columns: Email Address & Email Address Type. I've figured out how to populate it, but now I'm having trouble figuring out how to properly use the SelectedItems to get at the...
3
by: simchajoy2000 | last post by:
Hi, I am trying to use a VB.NET listview object to display information from a datatable. I need to have two columns of information but I don't want the user to be able to select each column...
4
by: Jonathan | last post by:
Hi, I have a listview with many rows init. The first column is "No." which shows the row number in the listview. When a user selected a row and delete it, say row 3. I want to organise the...
11
by: Siv | last post by:
Hi, I seem to be having a problem with a DataAdapter against an Access database. My app deletes 3 records runs a da.update(dt) where dt is a data.Datatable. I then proceed to update a list to...
5
by: John Devlon | last post by:
Hi, Does anyone know how to get a value of a second column of a selected item in Listview. I've create a listview and added this code Listview.Items.Clear() Listview.Columns.Clear()...
11
by: Armin Zingler | last post by:
"Bill Schanks" <wschanks@gmail.comschrieb Try to execute lvMembers.beginupdate before filling and lvMembers.endupdate
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.