wxWidgets 几个实用的系统函数

来源:互联网 发布:安装电视猫软件 编辑:程序博客网 时间:2024/06/05 10:36

http://www.cnblogs.com/godspeedsam/archive/2011/03/15/1984875.html

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

复制代码
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 }

 

原创粉丝点击