95 if (nReadChars > 0) 96 { 97 EmployeesFile.WriteString(Answer.c_str()); 98 EmployeesFile.WriteString(TEXT("\n")); 99 SaveCount++; 100 } 101 } 102 } 103 104 EmployeesFile.Close(); 105 106 TCHAR Information[256]; 107 StringCchPrintf(Information, _countof(Information), SaveCount, Total); 108 MessageBox(Information, MB_OK | MB_ICONINFORMATION | MB_DEFBUTTON1); 109 } 110 } 111 else 112 { // 113 TCHAR Information[256]; 114 StringCchPrintf(Information, _countof(Information), nReadChars); 115 MessageBox(Information, MB_OK | MB_ICONERROR | MB_DEFBUTTON1); 116 } 117 } 118 catch (DWORD dwErrorCode) 119 { // 120 TCHAR Information[256]; 121 StringCchPrintf(Information, _countof(Information), dwErrorCode); 122 MessageBox(Information, | MB_ICONERROR | MB_DEFBUTTON1); 123 } 124 catch (...) 125 { 126 127 } 128 129 // 130 if (TcpClient != NULL) 131 { 132 133 TcpClient = NULL; 134 } 135 } PageImport.h 1 #pragma once 2 3 4 // CPageImport 5 6 class CPageImport : public CDialogEx 7 { 8 DECLARE_DYNAMIC(CPageImport) 9 10 public:
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 if (nReadChars > 0) { EmployeesFile.WriteString(Answer.c_str()); EmployeesFile.WriteString(TEXT("\n")); SaveCount++; } } } EmployeesFile.Close(); TCHAR Information[256]; StringCchPrintf(Information, _countof(Information), SaveCount, Total); MessageBox(Information, MB_OK | MB_ICONINFORMATION | MB_DEFBUTTON1); } } else { // TCHAR Information[256]; StringCchPrintf(Information, _countof(Information), nReadChars); MessageBox(Information, MB_OK | MB_ICONERROR | MB_DEFBUTTON1); } } catch (DWORD dwErrorCode) { // TCHAR Information[256]; StringCchPrintf(Information, _countof(Information), dwErrorCode); MessageBox(Information, | MB_ICONERROR | MB_DEFBUTTON1); } catch (...) { } // if (TcpClient != NULL) { TcpClient = NULL; } } PageImport.h 1 2 3 4 5 6 7 8 9 10 #pragma once // CPageImport class CPageImport : public CDialogEx { DECLARE_DYNAMIC(CPageImport) public:
20160906170280058005.docx