如何在每行创建时显示clistctrl屏幕? [英] How do I show clistctrl screen at the time of every row create?

查看:97
本文介绍了如何在每行创建时显示clistctrl屏幕?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的MFC丑陋代码中使用CListCtrl报告样式:



A :: moveform()

{

CListCtrl.insertitem(item);

CListCtrl.SetItemText(stritem);

UpdateData(FALSE);

}



A ::来电者()

{

for(int i = 0; i< 100; i ++)

moveform();



返回;



}



来电者调用moveform()100次。

我想在每次循环时显示每一行。

但是上述程序的结果,在'返回; '点,

所有行都显示在完成100个循环。



你们哪一个显示正确的方法?



我的尝试:



更多1周浪费时间来解决问题。

In my MFC ugly code using CListCtrl report style:

A::moveform()
{
CListCtrl.insertitem(item);
CListCtrl.SetItemText(stritem);
UpdateData(FALSE);
}

A::Caller()
{
for(int i = 0;i<100;i++)
moveform();

return;

}

Caller call moveform() for 100 times.
I want to show the every row when each loop.
But the result of the above program, at the 'return;' point,
the all rows are shown at the completion of 100 loops.

Which one of you show the right method?

What I have tried:

More 1 weeks wasted to solve the problems.

推荐答案

这就是Windows的工作方式。您重复调用 moveform 会阻止更新在循环终止之前获得操作,并且您开始从队列中提取消息。
That is the way that Windows works. Your repeated calls to moveform is preventing the updates from getting actioned until the loop terminates, and you start pulling messages from the queue.


这篇关于如何在每行创建时显示clistctrl屏幕?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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