共 36 篇文章 |
|
Components and Code examples/esComponents and Code examples/es.StringHashMap - Contenedor asociativo de mapeo String -> puntero del mapa asociativo.bass ffmpeg SDL libpng FreeImage freetype JEDI-SDL Lua midi pcre portmixer projectM samplerate SQLite zlib fft Programas de ejemplo.Ver también: Page_Of_Code_Sites... 阅570 转0 评0 公众公开 12-12-07 10:07 |
SynEdit – 原始码编辑器组件 (IDE会用到的,而且很好用,当您Mark了一整段程序时,只要启动 Sync Edit 功能,就能在改变其中一个变量/组件名称/属性名称时,同时同步改动这段程序代码里面使用到相同组件/变量的部分)2007, Brain Patchwork DX, LLC. 将它们的 TCP/UDP 客户端与服务器端组件移植供 Lazarus 0.9.2.2/ FPC 2.0.4 使用,包含视觉组... 阅500 转0 评0 公众公开 12-12-02 22:11 |
一般shortstring ansistring存放ANSI和UTF-8,unicodestring widestring存放UTF-16。ANSI与UTF-8之间的转换用SysToUTF8 UTF8ToSys,UTF-8与UTF-16之间用UTF8ToUTF16 UTF16ToUTF8。若编码方式是UTF-8,UTF-8是变长的编码方式,英文只占1个字节,其它的占1~6个字节,‘?’占2个字节,而Length函数属于RTL库,所以长度返回12. 若编码方式是ANSI,... 阅2999 转4 评1 公众公开 12-11-30 19:32 |
Lazarus获取TTreeView鼠标处的TreeNodeLazarus获取TTreeView鼠标处的TreeNode(2011-03-24 22:13:23)获取TTreeView鼠标处的TreeNode.要点:鼠标直接读取的坐标是相对于屏幕的,GetNodeAt是相对于TreeView的内部坐标,需要转化。tp:TPoint;tp.x:=mouse.tp.y:=mouse.tp:=treeview1.ScreenToClient(tp);tti:=treeview1.GetNodeAt(tp.x,tp.y); 阅103 转1 评0 公众公开 12-11-30 19:06 |
Lazarus使用的是UTF8编码,而很多windows程序使用的是ANSI编码,编码问题在此不多说大家可以google去。function UTF8Encode(const s : WideString) :UTF8String;function UTF8Decode(const s : UTF8String):WideString;function AnsiToUtf8(const s : ansistring): UTF8String;{$endif} function Utf8ToAnsi(const s : UTF8String) : ansistrin... 阅114 转1 评0 公众公开 12-11-30 19:05 |
DrawCell(aCol, aRow: Integer;ifCellNeedsCheckboxBitmaps(aCol,aRow) then DrawCellCheckboxBitmaps(aCol,aRow,aRect);】 if DefaultDrawing then begin ifColumns.Enabled and (gdFixed in aState) and (aCol>=FixedCols) and (aRow=0) then //inherited already did else if notCellNeedsCheckboxBitmaps(aCol, aRo... 阅821 转0 评0 公众公开 12-11-30 19:05 |
i,L,counter,cL,sp:integer;if (b and $FC)=$FC then CL:=6 else if (b and $F8)=$F8 then CL:=5 else if (b and $F0)=$F0 then CL:=4 else if (b and $E0)=$E0 then CL:=3 else if (b and $C0)=$C0 then CL:=2 else if (b and$80)<>$80 then CL:=1 else CL:=0;sp:=sp+CL; 阅512 转0 评0 公众公开 12-11-30 19:04 |
今天碰到了Lazarus编译模式的问题,以前一直认为Lazarus和delphi语法之类的都是一样的, 今天在事实面前证明,不一样!{$mode delphi} 或者 {$mode objfpc}This mode is selected by the $MODE DELPHI switch.Ansistrings are default,this means that $MODE DELPHI impliesan implicit {$HON}.This mode is selected by the $MODE OBJFPC swi... 阅683 转0 评0 公众公开 12-11-30 19:03 |
if length(tc)=1 then begin //如果是ASCII字符,直接返回 result:=result+tc; continue; end; //查询汉字表 for j:=0 topinyintable.Count-1 do begin ifpos(tc,pinyintable[j])>0 then begin result:=result+copy(pinyintable[j],0,1); break; ... 阅5155 转6 评0 公众公开 12-11-30 19:02 |