|
BOOL CMyCOMDlg::OnInitDialog() |
|
{ |
|
CDialog:OnInitDialog(); |
|
//以上为MFC框架自动生成的代码,在此不列出 |
|
//TODO:Add extra initialization here |
|
m_wndCOM1.SetCommPort(1); |
|
m_wndCOM1.SetSettings("9600,e,7,1"); |
|
m_wndCOM1.SetRThreshold(1); |
|
m_wndCOM1.SetSThreshold(0); |
|
m_wndCOM1.SetInputLen(1); |
|
m_wndCOM1.SetPortOpen(TRUE);//打开通信口 |
|
return TRUE;//return TRUE unless you set the focus to a control |
|
} |