Browse Source

Find != -1表示找到。

sat23 4 years ago
parent
commit
eb0102f0c1
1 changed files with 1 additions and 1 deletions
  1. 1 1
      TCLTools/TCLTools/TCLToolsDlg.cpp

+ 1 - 1
TCLTools/TCLTools/TCLToolsDlg.cpp

@@ -135,7 +135,7 @@ BOOL CTCLToolsDlg::OnInitDialog()
 
     InitCommandCombobox();
     CString strCOM = AfxGetApp()->GetProfileString("TCLTools","COM", "");
-    if ( strCOM.Find("COM") )
+    if ( strCOM.Find("COM") != -1 )
     {
         m_cbSerial.SelectString(0, strCOM);
     }