摘要:wxScreenshotMaker.h#pragma once #include #ifdef __WXMAC__ #include #endif class wxScreenshotMaker { public: wxScreenshotMaker(); ~wxScreenshotMaker(); wxBitmap GetScreenshot(); private: #ifdef __WXMAC__ int screenWidth; int screenHeight; CGLContextObj glContextObj; ...
阅读全文
摘要:// 根据本人的经验胡乱写写:// linux下获得可用磁盘空间大小采用: string sCmd = "df -m /usr/local | awk '{ if(NR == 2) print $4 }'"; string sResult = pipeIPC(sCmd); pipeIPC()如下:string pipeIPC(const string& command){ string sResult = ""; char *s = new char[2048]; bzero(s, 2047); FILE *fp = NULL;
阅读全文
摘要:先上代码,压缩包的文件结构解析: zip=unzOpen(resItem->filename); if(0==zip) return false; done=unzGoToFirstFile(zip); while(done==UNZ_OK) { unzGetCurrentFileInfo(zip, &file_info, szZipName, sizeof(szZipName), NULL, 0, NULL, 0); _strupr_s( szZipN...
阅读全文