Parcourir la source

添加按钮提示。

sat23 il y a 3 ans
Parent
commit
90a7cec082
1 fichiers modifiés avec 10 ajouts et 1 suppressions
  1. 10 1
      SetMAC/SetMAC/SetMACDlg.cpp

+ 10 - 1
SetMAC/SetMAC/SetMACDlg.cpp

@@ -192,7 +192,16 @@ void CSetMACDlg::OnBnClickedSetVirMac()
         std::map<CString, CString>::iterator it = _MacFactoryName.find(strText);
         if ( it != _MacFactoryName.end() )
         {
-            WriteProfileString(_T("MOKAFactoryTools"), _T("VirMAC"), it->second);
+            if(WriteProfileString(_T("MOKAFactoryTools"), _T("VirMAC"), it->second))
+            {
+                MessageBox(_T("修正成功"), _T("提示"), MB_OK);
+            }
+            else
+            {
+                CString strError;
+                strError.Format(_T("修改失败:%ld"), GetLastError());
+                MessageBox(strError, _T("提示"), MB_OK);
+            }
         }
     }
 }