WinAPI:还有其他方法可以将项添加到SysListView32中吗? [英] WinAPI: Is there any other way to add items into SysListView32 ?

查看:216
本文介绍了WinAPI:还有其他方法可以将项添加到SysListView32中吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好。


我知道通过SendMessage添加项目。所以我需要为每个元素调用SendMessage。


但是有没有办法在SysListView32创建时添加所有元素,或者可能通过DLGITEMTEMPLATE CreationData数组? / p>

或者其他什么?





例如,如果我想创建包含5列和4行的SysListView32,我需要调用SendMessage 9次。


是否可以最小化它?

解决方案

您是否尝试过InsertItem()。但是无论你使用什么,如果你想在列表中输入n no of item,你就不得不调用那个函数。


谢谢


Hello.

I know about adding items by SendMessage. So i need to call SendMessage for each element.

But is there any way to add all elements on SysListView32 creation, or maybe through DLGITEMTEMPLATE CreationData array ?

Or maybe something else ?


For example, if I want to create SysListView32 with 5 columns and 4 rows, i need to call SendMessage 9 times.

Is it possible to minimize it any way?

解决方案

Did you tried InsertItem(). But regardless whatever you used you have to call that function n no of time if you want to enter n no of item in the list.

Thanks


这篇关于WinAPI:还有其他方法可以将项添加到SysListView32中吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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