06 2011 档案

wxWidgets 屏幕截图
摘要: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; ... 阅读全文

posted @ 2011-06-29 15:52 几百人有爱 阅读(428) 评论(0) 推荐(0) 编辑

Linux and windows Porting
摘要:// 根据本人的经验胡乱写写:// 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; 阅读全文

posted @ 2011-06-07 21:30 几百人有爱 阅读(259) 评论(0) 推荐(0) 编辑

Zlib解压缩示例
摘要:先上代码,压缩包的文件结构解析: 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... 阅读全文

posted @ 2011-06-02 09:42 几百人有爱 阅读(892) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示