wxWidgets 几个实用的系统函数

代码说话,各函数功能一目了然:

1 void shelltest()
2 {
3 wxExecute(wxT("notepad.exe newfile.txt"));
4 }
5
6  void sysutils()
7 {
8 wxString output(wxT("Home dir:"));
9 output<<wxGetHomeDir();
10 output<<wxT("\nOs Description:")<<wxGetOsDescription();
11 output<<wxT("\nUse Name:")<<wxGetUserName();
12 output<<wxT("\nUser Id:")<<wxGetUserId();
13 output<<wxT("\nEmail Address:")<<wxGetEmailAddress();
14 output<<wxT("\nFull Host Name:")<<wxGetFullHostName();
15 output<<wxString::Format(wxT("\nFree Memory:%.2fG"),(double)wxGetFreeMemory().ToLong()/1024/1024/1024);
16 output<<wxString::Format(wxT("\n64bit?%s"),wxIsPlatform64Bit()?wxT("Yes"):wxT("No"));
17 output<<wxString::Format(wxT("\nLittle Endian?%s"),wxIsPlatformLittleEndian()?wxT("Yes"):wxT("No"));
18 cout<<output<<endl;
19 }
原文地址:https://www.cnblogs.com/godspeedsam/p/1984875.html