소스 검색

添加按钮提示。

sat23 3 년 전
부모
커밋
90a7cec082
1개의 변경된 파일10개의 추가작업 그리고 1개의 파일을 삭제
  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);
+            }
         }
     }
 }