diff options
author | crupest <crupest@outlook.com> | 2021-06-07 14:21:14 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-06-07 14:21:14 +0800 |
commit | ad9a2ad2a3f0488127e3fb618e4b30a40b50f57d (patch) | |
tree | d5bd9d53fe399e5fc49684d4f75d9545a81dbfcd | |
parent | 6774bcc32ac23728827b36a8c2c2350e811f7940 (diff) | |
download | life-ad9a2ad2a3f0488127e3fb618e4b30a40b50f57d.tar.gz life-ad9a2ad2a3f0488127e3fb618e4b30a40b50f57d.tar.bz2 life-ad9a2ad2a3f0488127e3fb618e4b30a40b50f57d.zip |
...
-rw-r--r-- | computer-network-experiment/Common.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/computer-network-experiment/Common.cpp b/computer-network-experiment/Common.cpp index fbdb2c8..5be3971 100644 --- a/computer-network-experiment/Common.cpp +++ b/computer-network-experiment/Common.cpp @@ -67,6 +67,12 @@ void BeforeExit() { int main() {
#ifdef WIN32
+ HANDLE h = GetStdHandle(STD_OUTPUT_HANDLE);
+ DWORD mode;
+ GetConsoleMode(h, &mode);
+ mode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING;
+ SetConsoleMode(h, mode);
+
InitWSA();
#endif
|