如何使用C ++在Listview中导入txt [英] How to import a txt in Listview using C++

查看:92
本文介绍了如何使用C ++在Listview中导入txt的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我是使用c ++语言的初学者.
我已经成功导出了txt文件中的listview数据.我面临的困难是将 txt 文件的一行导入导入 listview .

请帮忙!!!

Thnx:)

Hello Everyone,

I''m a beginner with the language c++
I''ve succeeded in exporting the data of the listview in txt file. The difficulty that I’m facing is importing one line of a txt file into the listview.

Please Help!!!

Thnx :)

推荐答案

这并不难,只需使用您喜欢的函数将文本文件行读取为字符串,创建一个LVITEM实例,并正确设置其pszTextmask成员,最后通过 ListView_InsertItem将其传递给ListView [ ^ ].
It is not difficult, just use you preferred function for reading the text file line into a string, create a LVITEM instance, set properly its pszText and mask members, finally pass it to the ListView via ListView_InsertItem[^].


您绝对应该改善您的问题...

您尝试了什么?
出什么问题了?
...

我们不能以这种方式帮助您...

如果您已经能够将ListView信息获取到文本文件中,那么您应该能够以另一种方式进行该过程,但是我们需要更多信息...

尝试提供帮助:
您应该可以打开该文件以进行读取.
搜索每行的结尾,然后选择所需的行.
将该信息放入ListView ...

应该很容易...

但是你必须改善你的问题...
You should definitely improve your question...

What have you tried?
Which is the problem?
...

We can''t help you in that way...

If you''ve been able to get the ListView information to a text file, then you should be able to make the process in the other way round, but we need more information...

Trying to help:
You should be able to open the file in order to read.
Search for the end of each line and select the line you want.
Put that information inside the ListView...

Should be easy...

But you must improve your question...


这篇关于如何使用C ++在Listview中导入txt的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆