将运行时传入数据传递给对话 [英] Pass runtime incoming data to dialogues

查看:63
本文介绍了将运行时传入数据传递给对话的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨!,

我在mfc对话框中有一个关于对话数据传递的查询,其中First Dialogue按钮生成的事件调用第二个对话框,但是第一个对话框有连接按钮,它通过串口连续接收数据,所以每当我切换到另一个对话框时,这个即将到来的数据应显示在第二个对话框的相应控件上?

如何通过单独的对话框或对所有对话框进行共同控制来实现这一点?

Hi!,
I have one query regarding dialogue data passing in mfc dialogs,in which First Dialogue button generated event calls second dialogue,but first dialogue has connect button which receives data through serial continuously, so whenever I switched to another dialogue,this upcoming data should displayed on respective control of Second dialog?
How to achieve that by taking separate dialogs or take common control on all dialogs??

推荐答案

您应该在工作线程中处理串行通信,并将接收到的数据发送到控件所需的任何对话框。
You should handle the serial communication in a worker thread and dispatch the received data to whatever dialog's control needs it.


这篇关于将运行时传入数据传递给对话的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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