如何更新编辑框中滚动条移动的数据? [英] How to update Data on Scroll bar movement in Edit Box?

查看:85
本文介绍了如何更新编辑框中滚动条移动的数据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello Everyone,





在基于Dialog的应用程序中,我放置了一个包含只读和多行属性的编辑框。我在编辑框中显示1300或更多值。但是在向下滚动时,值会重写。简而言之,窗口没有得到更新或重绘。请帮帮我。我几乎在我的申请结束时,我不能采取任何其他方法。



在我的应用程序中,m_EditBox是Edit Box的变量,m_szBuffer是CString变量。



On Button事件我使用以下行在编辑框中显示值。

Hello Everyone,


In my Dialog based application I have placed a Edit box with Read Only and Multiline properties. I am displaying 1300 or more values in the edit box. But on scrolling down the values get over written. In short the window is not getting updated or Repaint. Please help me out. I am almost at the end of my application and I can't go for any other method.

In my application, m_EditBox is the variable for Edit Box and m_szBuffer is the CString variable for the same.

On Button event I am using the following lines to display the values in edit box.

{
m_szBuffer = szTemp;
UpdateData(FALSE);
}

推荐答案

如果m_szBuffer是EditBox的变量(一个奇怪的名字),那么你需要写这样的东西:



If m_szBuffer is the variable for EditBox (a strange name) so you need to write something like this:

CEdit *m_szBuffer;

 //m_szBuffer = reinterpret_cast<CEdit *>(GetDlgItem(IDC_DISPLAY));
 m_szBuffer->SetWindowText(szTemp);


这篇关于如何更新编辑框中滚动条移动的数据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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