wxWidgets 几个实用的系统函数

来源:互联网 发布:零编程基础学plc 编辑:程序博客网 时间:2024/06/12 21:28
void shelltest() { 3     wxExecute(wxT("notepad.exe newfile.txt")); }   void sysutils() {     wxString output(wxT("Home dir:"));     output<<wxGetHomeDir();     output<<wxT("\nOs Description:")<<wxGetOsDescription();     output<<wxT("\nUse Name:")<<wxGetUserName();     output<<wxT("\nUser Id:")<<wxGetUserId();     output<<wxT("\nEmail Address:")<<wxGetEmailAddress();     output<<wxT("\nFull Host Name:")<<wxGetFullHostName();     output<<wxString::Format(wxT("\nFree Memory:%.2fG"),(double)wxGetFreeMemory().ToLong()/1024/1024/1024);     output<<wxString::Format(wxT("\n64bit?%s"),wxIsPlatform64Bit()?wxT("Yes"):wxT("No"));     output<<wxString::Format(wxT("\nLittle Endian?%s"),wxIsPlatformLittleEndian()?wxT("Yes"):wxT("No"));     cout<<output<<endl; }

0 0
原创粉丝点击