Explorar o código

修正问题:默认命令为Index = 0;

sat23 %!s(int64=4) %!d(string=hai) anos
pai
achega
ee22c02b72
Modificáronse 1 ficheiros con 2 adicións e 3 borrados
  1. 2 3
      TCLTools/TCLTools/TCLToolsDlg.cpp

+ 2 - 3
TCLTools/TCLTools/TCLToolsDlg.cpp

@@ -131,9 +131,8 @@ BOOL CTCLToolsDlg::OnInitDialog()
 	// TODO: 在此添加额外的初始化代码
     GetSysSerialPort(m_vtPorts);
     InitSerialCombobox();
-    m_cbSerial.SetCurSel(0);
-
     InitCommandCombobox();
+    m_cbCommands.SetCurSel(0);
     CString strCOM = AfxGetApp()->GetProfileString("TCLTools","COM", "");
     if ( strCOM.Find("COM") != -1 )
     {
@@ -141,7 +140,7 @@ BOOL CTCLToolsDlg::OnInitDialog()
     }
     else
     {
-        m_cbCommands.SetCurSel(0);
+        m_cbSerial.SetCurSel(0);
     }
 
 	return TRUE;  // 除非将焦点设置到控件,否则返回 TRUE