简体   繁体   English

Windows 8和CListCtrl

[英]Windows 8 and CListCtrl

I'm currently trying to port a produce to Windows 8 (desktop mode). 我目前正在尝试将农产品移植到Windows 8(桌面模式)。 According to Microsoft, the product should just work, but I'm hitting an issue when using a CListCtrl call. 根据Microsoft的说法,该产品应该可以正常工作,但是在使用CListCtrl调用时遇到了问题。 The list control produces the list items, but no text is displayed onto the list control, just a blank document icon. 列表控件产生列表项,但是没有文本显示在列表控件上,只是一个空白文档图标。

The control is an owner drawn control and the data being passed in is definitely valid, but when inserting this data into a new entry in the control, it ends up being displayed as blank. 该控件是所有者绘制的控件,并且传入的数据绝对有效,但是当将此数据插入控件中的新条目时,最终将显示为空白。 This only occurs on Windows 8.. 这仅在Windows 8上发生。

Has anyone come across this problem, or have any ideas on what the issue could be? 有没有人遇到这个问题,或者对这个问题可能有什么想法?

It turns out that we were calling a ListBox_AddItemData() to push the windows message in, which worked in previous versions of Windows, but Windows 8 does not allow this. 事实证明,我们正在调用ListBox_AddItemData()来推送Windows消息,该消息在Windows的早期版本中有效,但是Windows 8不允许这样做。

What is actually catching this message is a ListView control. 实际捕获此消息的是ListView控件。 Once I switched the function calling ListBox_AddItemData() to send a custom message, being caught by the ListView control, the pointers are now correct, so it's something changed in the message cracker for Listbox_AddItemData. 一旦我切换了调用ListBox_AddItemData()的函数以发送自定义消息(被ListView控件捕获),指针现在就正确了,因此在消息破解器中对Listbox_AddItemData进行了一些更改。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM