12 2013 档案

摘要:#pragma comment(lib,"opengl32.lib") 阅读全文
posted @ 2013-12-25 10:20 酷熊 阅读(125) 评论(0) 推荐(0) 编辑
摘要:删除android:paddingBottom、android:paddingLeft、android:paddingRight和android:paddingTop四个属性 阅读全文
posted @ 2013-12-24 11:22 酷熊 阅读(246) 评论(0) 推荐(0) 编辑
摘要:在AndroidMenifest.xml中activity标签中,添加一个属性android:screenOrientation="landscape" 阅读全文
posted @ 2013-12-24 11:17 酷熊 阅读(218) 评论(0) 推荐(0) 编辑
摘要:WebStorm注册码User Name:EMBRACELicense Key:===== LICENSE BEGIN =====24718-1204201000001h6wzKLpfo3gmjJ8xoTPw5mQvYYA8vwka9tH!vibaUKS4FIDIkUfy!!f3C"rQCIRbShpSlDcFT1xmJi5h0yQS6===== LICENSE END =====PhpStorm注册码User Name:EMBRACELicense Key:===== LICENSE BEGIN =====43136-1204201000002UsvSON704l"dIL 阅读全文
posted @ 2013-12-17 15:56 酷熊 阅读(320) 评论(0) 推荐(0) 编辑
摘要:项目右键-属性-配置属性-C/C++-高级-禁用特定警告-填写警告编号例如4996 阅读全文
posted @ 2013-12-13 15:25 酷熊 阅读(872) 评论(0) 推荐(0) 编辑
摘要:工具-选项-文本编辑器-文件扩展名-勾选“将无扩展名文件映射到(M)” Microsoft Visual C++ 阅读全文
posted @ 2013-12-08 15:36 酷熊 阅读(466) 评论(0) 推荐(0) 编辑
摘要:视图-属性管理器-随便选择一个项目例如MyProject-Debug|Win32-Microsoft.Cpp.Win32.user-右键“属性”-VC++目录Release同理 阅读全文
posted @ 2013-12-05 14:05 酷熊 阅读(639) 评论(0) 推荐(0) 编辑
摘要:读取二进制格式的STL模型文件 std::ifstream fin;fin.open(stlFilePath, std::ios::in | std::ios::binary);bool isBinary=true;//判断stl是否是二进制流文件fin.seekg(0, std::ios::end 阅读全文
posted @ 2013-12-05 09:45 酷熊 阅读(794) 评论(0) 推荐(0) 编辑
摘要:在命令行窗口中输入:for /f %i in (f:\mydata.txt) do echo %i如果要是写成批处理文件run.batfor /f %%i in (f:\mydata.txt) do echo %%ipause 阅读全文
posted @ 2013-12-05 09:13 酷熊 阅读(1354) 评论(0) 推荐(0) 编辑
摘要://关于文件(夹)操作,可以参考下SHFileOperation这个外壳函数,貌似可以显示进度条。以下没有使用SHFileOperation//删除一个文件夹下的所有内容void myDeleteDirectory(CString directory_path) { CFileFind finder; CString path; path.Format("%s/*.*",directory_path); BOOL bWorking = finder.FindFile(path); while(bWorking){ bWorking = finder.FindNextFile 阅读全文
posted @ 2013-12-04 18:13 酷熊 阅读(297) 评论(0) 推荐(0) 编辑
摘要://如果涉及到大文件的遍历(大于4GB),可以将以下代码_finddata_t换成__finddata64_t,_findfirst换成_findfirst64,_findnext换成_findnext64void dfsFolder(CString dirPath){_finddata_t FileInfo;CString tmp=dirPath;if (tmp.Right(1) != "\\")tmp += "\\";CString strfind = tmp + "*";long Handle = _findfirst(strf 阅读全文
posted @ 2013-12-04 18:10 酷熊 阅读(405) 评论(0) 推荐(0) 编辑
摘要://选择文件CFileDialog dlg(TRUE, 0, 0, OFN_HIDEREADONLY, "文本文件|*.txt|所有文件|*.*)||",0);if (dlg.DoModal()){CString filePath=dlg.GetPathName();CString fileNameWithNoExt=dlg.GetFileTitle();}//选择文件夹版本1void CMyTestDlg::OnBnClickedButton1(){TCHAR chPath[255]; //用来存储路径的字符串CString strPath;BROWSEINFO bInf 阅读全文
posted @ 2013-12-04 18:04 酷熊 阅读(2204) 评论(0) 推荐(0) 编辑
摘要:COLORREF color=RGB(0,255,0);unsigned char r=GetRValue(color);unsigned char g=GetGValue(color);unsigned char b=GetBValue(color);-------------------------------------CColorDialog colorDialog;COLORREF color;if( colorDialog.DoModal() == IDOK ){ color = colorDialog.GetColor();}--------------------------- 阅读全文
posted @ 2013-12-04 17:33 酷熊 阅读(1775) 评论(0) 推荐(0) 编辑
摘要:下例使用这些函数来获得一个二进制文件的大小:// obtaining file size#include #include const char * filename = "example.txt";int main () {long l,m;ifstream file (filename,ios::in|ios::binary);l = file.tellg();file.seekg (0, ios::end);m = file.tellg();file.close();cout << "size of " << filenam 阅读全文
posted @ 2013-12-03 17:29 酷熊 阅读(186) 评论(0) 推荐(0) 编辑

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