设View类中有一个串口控件m_ctrlComm
CMainFrame* pFrame = (CMainFrame *)AfxGetMainWnd();
CMy3012HView *pView = (CMy3012HView *)pFrame->GetActiveView();
pView->m_ctrlComm.SetOutput(COleVariant("A")); //发送字符"A"
本文介绍了一个使用特定视图类通过串口控件发送字符“A”的示例。该示例展示了如何通过获取主窗口及活动视图来操作串口控件。
设View类中有一个串口控件m_ctrlComm
CMainFrame* pFrame = (CMainFrame *)AfxGetMainWnd();
CMy3012HView *pView = (CMy3012HView *)pFrame->GetActiveView();
pView->m_ctrlComm.SetOutput(COleVariant("A")); //发送字符"A"

被折叠的 条评论
为什么被折叠?