2011年3月11日

摘要: {使用 Lazarus + Bass 来测试跨平台,在 Ubuntu 中很正常,在 Windows 中只能播放英文名的 MP3,看了一下官方例子,应该是以下的问题。}var f: PChar; s: string;begin if not OpenDialog2.Execute then Exit; s := OpenDialog2.FileName; //f := Pchar(s); f:= Pchar(Utf8ToAnsi(s)); //修改为这个,该死的编码。。。 strs[strc] := BASS_StreamCreateFile(False, f ,0, 0, 0); if str 阅读全文
posted @ 2011-03-11 15:55 思想。生活。网络 阅读(690) 评论(0) 推荐(0) 编辑

2010年7月15日

摘要: (* This can be used for Streams OR files. Set AStream parameter to nil if passing a FileName. Usage: Scan a Stream: ScanIt('texttofind', False, MyMemoryStream); Scan a File: ScanIt('texttofind', False... 阅读全文
posted @ 2010-07-15 08:29 思想。生活。网络 阅读(570) 评论(0) 推荐(0) 编辑
摘要: begin AddFontResource(Pchar(ExtractFilePath(ParamStr(0))+'NAME DER SCHRIFFT')); //打开你的字体文件 SendMessage(HWND_BROADCAST,WM_FONTCHANGE,0,0); //通知系统更新字体消息 Application....//使用之 RemoveFontResource(pchar(E... 阅读全文
posted @ 2010-07-15 08:24 思想。生活。网络 阅读(404) 评论(0) 推荐(0) 编辑

2010年7月10日

摘要: type ShopCat = record cid: Integer; parent_cid: Integer; name: string[30]; is_parent: boolean; end; PShopCat = ^ShopCat; TShopCat = Array of ShopCat; PTShopCat = ^TShopCat;procedure TForm1.Button... 阅读全文
posted @ 2010-07-10 19:38 思想。生活。网络 阅读(138) 评论(0) 推荐(0) 编辑
摘要: type TArr = array[0..MaxListSize] of Char; PArr = ^TArr;var arr: PArr; i: Integer;begin arr := GetMemory(5); for i := 0 to 4 do arr[i] := Chr(65+i); ShowMessage(PChar(arr)); {ABCDE} arr := Rea... 阅读全文
posted @ 2010-07-10 19:05 思想。生活。网络 阅读(120) 评论(0) 推荐(0) 编辑

2010年7月8日

摘要: function SplitStr(pSource: string; OldStr: string; SpliChar: Char): string;var s: string; strList: TStrings; i: Integer; iPos: Integer; sPos: string;begin Result := ''; strList := TStringList.C... 阅读全文
posted @ 2010-07-08 11:05 思想。生活。网络 阅读(137) 评论(0) 推荐(0) 编辑

2010年7月5日

摘要: function MyStr(ASource: string; Index: Integer): string; var st: TStrings; i: Integer; begin Result := ''; st := TStringList.Create; i := ExtractStrings([';'], [], PChar(ASource), st); if (i > 0)... 阅读全文
posted @ 2010-07-05 08:54 思想。生活。网络 阅读(108) 评论(0) 推荐(0) 编辑

2010年7月1日

摘要: 将将以上代码放在工程文件 DPR 的 USER 前。重新 Build 你的工程。来自:http://www.zipplet.co.uk/index.php/content/articles_programming_delphi2010rtti 阅读全文
posted @ 2010-07-01 19:45 思想。生活。网络 阅读(272) 评论(0) 推荐(0) 编辑

2010年6月25日

摘要: function Calc(s: string): string;var vScript: Variant;begin vScript := CreateOleObject('ScriptControl'); vScript.Language := 'VBScript'; Result := vScript.Eval(s);end;//调用var s:string;begin s:=C... 阅读全文
posted @ 2010-06-25 22:54 思想。生活。网络 阅读(196) 评论(0) 推荐(0) 编辑

2010年6月20日

摘要: var st: TStrings;begin st := TStringList.Create; st.StrictDelimiter := True;//这个多少人用过? st.Delimiter := ' '; st.DelimitedText := '0 1 2';//用语言描述就是 [0][空格][1][TAB键][2] ShowMessage(st.Text); st.Fr... 阅读全文
posted @ 2010-06-20 21:44 思想。生活。网络 阅读(329) 评论(0) 推荐(0) 编辑

导航