473,406 Members | 2,220 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,406 software developers and data experts.

cannot search a item with LVM_FINDITEM message

I am using List View Control in my program. It works fine when adding new items, updating items, or deleting items.

But I cannot search a item with LVM_FINDITEM message.
It always return -1 when searching for the index of a item.


Here is how I add items

LVITEM LvItem; // ListView Item struct
...............
LvItem.iItem = 0; // choose item
LvItem.iSubItem = 0; // Put in first coluom
LvItem.pszText = (LPSTR)task.c_str(); // Text to display
LvItem.lParam = _id;
SendMessage(_taskMgr,LVM_INSERTITEM,0,(LPARAM)&LvI tem);

Here is how I serach the index of an item

LVFINDINFO lvfi;
lvfi.flags = LVFI_PARAM;
lvfi.lParam = id;
return SendMessage(_taskMgr, LVM_FINDITEM, -1,(LPARAM)(&lvfi));
.....

The return value is always -1.

Thank you for your help.
Apr 13 '07 #1
0 1671

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

Similar topics

10
by: mike | last post by:
regards: I use Jtidy (api) to translate a HTML file into a "XHTML file". But The "XHTML file" cannot be identified by nokia 6600. Do I miss something important? Or this is Jtidy's weakness or...
2
by: Sriram | last post by:
Hi, i am developing a search page, basically using datagrid. i have given a column as hyperlink so that when the user clicks on it, it gives the details of the selected item in a seperate page....
1
by: sianan | last post by:
I tried to use the following example, to add a checkbox column to a DataGrid in an ASP.NET application: http://www.codeproject.com/aspnet/datagridcheckbox.asp For some reason, I simply CAN'T get...
2
by: A_PK | last post by:
Basically what I want to do is same wtih pocket pc...Inside ListiView, when I click the white pot on listview, then highlighted item will become unhighlight... but when click the on highlighted...
0
by: | last post by:
I have a question about spawning and displaying subordinate list controls within a list control. I'm also interested in feedback about the design of my search application. Lots of code is at the...
6
by: zfareed | last post by:
<code> #include <iostream> #include <fstream> const int MAX_LENGTH = 10; using namespace std;
2
by: leeperman | last post by:
In Dreaweaver I cannot filter my database results to display only specific data that is retrieved from mulptile drop down list on my search page. The drop down list selections are posted to my...
4
by: sirjohnofthewest | last post by:
If I possessed the power to sway the mind of every user in the world to delete all forms of Internet Explorer I would die a happy man. Hi guys, I frequently visit this site to get answers to my...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.