如何在使用 WxWidgets 从串行端口读取时不断更新我的面板绘图
How can I constantly update my panel drawing while reading from the serial port using WxWidgets
我正在使用WxWidgets在C++中创建表单应用程序,我需要在从串行端口接收数据时绘制图形。如何做到这一点?我的序列号工作正常。我只需要能够不断接收串行数据并更新我的图表。
我是事件驱动编程的新手,我正在使用代码块。我可以使用事件吗?是否可以在事件中使用 while 循环,我试过这个,程序崩溃了。
谢谢。
最好的解决方案是将处理串行端口的代码移动到单独的线程,并将事件从该线程发布到主线程以更新 GUI。
相关文章:
- 为什么我的变量没有更新,我的 LED 没有亮起?
- 如果我想在没有更新编译器的情况下使用新功能,该怎么办?
- 我的主窗口在创建时或单击更新区域时是否会收到编辑控件?
- 为什么我的数组值会更新为随机值?
- 为什么我的矢量不随我对其元素所做的更改而更新
- 如何确保我的"ifstream"文件对象指向的文件内容已更新?
- C++无法更新我的一个变量
- 在CentOS 7上安装GCC 7.4.0不会更新我的LIBSTDC 版本
- 为什么我的函数只在我用 & 符号传递结构时才更新结构?
- 为什么我的终端没有运行更新的C++代码?
- 2D 弹丸 - 更新我的 x 和 y 值
- 如何在使用 WxWidgets 从串行端口读取时不断更新我的面板绘图
- 如何为我的Visual Studio 2010 C 应用程序进行自动更新
- 为什么我的阵列没有更新
- STL 列表迭代器不会更新我的对象
- Tcl_LinkVar和Tcl_UpdateLinkedVar没有更新我的 TCL 变量
- 并行执行不更新我的变量
- 如何更新我的代码从终端Github
- 我如何确定为什么OpenGL入口点丢失后更新我的图形驱动程序
- 如何在Visual Studio 2015中更新我的c++项目以使用新的通用CRT