随笔分类 -  cnpack专题

CnCommon单元之SameCharCounts、CharCounts【6】
摘要:// 两个字符串的前面的相同字符数 function SameCharCounts(s1, s2: string): Integer; var Str1, Str2: PChar; begin Result := 1; s1 := s1 + #0; s2 := s2 + #0; Str1 := PC 阅读全文

posted @ 2021-05-13 12:58 YXGust 阅读(120) 评论(0) 推荐(0) 编辑

CnCommon单元之GetDirectory、FormatPath【5】
摘要:function SelectDirCB(Wnd: HWND; uMsg: UINT; lParam, lpData: LPARAM): Integer stdcall; begin if (uMsg = BFFM_INITIALIZED) and (lpData <> 0) then SendMe 阅读全文

posted @ 2021-05-09 23:41 YXGust 阅读(123) 评论(0) 推荐(0) 编辑

CnCommon单元之FileProperties、OpenDialog【4】
摘要:// 打开文件属性窗口procedure FileProperties(const FName: string); var SEI: SHELLEXECUTEINFO; begin with SEI do begin cbSize := SizeOf(SEI); fMask := SEE_MASK_ 阅读全文

posted @ 2021-05-09 23:22 YXGust 阅读(99) 评论(0) 推荐(0) 编辑

CnCommon单元之MoveFile、DeleteToRecycleBin【3】
摘要:今天要学习的是MoveFile函数,作用就是移动文件或者文件夹。其实在系统kernel32.dll的API中已经提供该函数。 不过本着学习的精神还是分析下被重新打包的MoveFile函数 // 移动文件、目录 function MoveFile(const sName, dName: string) 阅读全文

posted @ 2021-05-01 22:30 YXGust 阅读(126) 评论(0) 推荐(0) 编辑

CnCommon单元之ForceDirectories【2】
摘要:// 递归创建多级子目录 function ForceDirectories(Dir: string): Boolean; begin Result := True; if Length(Dir) = 0 then begin Result := False; Exit; end; Dir := E 阅读全文

posted @ 2021-04-30 13:18 YXGust 阅读(87) 评论(0) 推荐(0) 编辑

CnCommon单元之ExploreFile【1】
摘要:感谢cnPack前辈们开源了如此优秀的源码,不学习下真的是浪费了。今天开始逐个分析,提升自己。 // 在资源管理器中打开指定文件夹或者文件,可设置选中状态 procedure ExploreFile(const AFile: string; isSelect: Boolean=False); var 阅读全文

posted @ 2021-04-30 12:03 YXGust 阅读(139) 评论(0) 推荐(0) 编辑

导航

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