随笔分类 - VCL
摘要:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--TestPanel=class(Tpanel)publicprocedurePaint;override;end;procedureTestPanel.Paint;varR:TRect;beginin...
阅读全文
摘要:TList 源码分析TPointerList = array[0..MaxListSize - 1] of Pointer;TList 的本质就是个无类型指针的数组TList = class(TObject) private FList: PPointerList; FCount: Integer; FCapacity: Integer; protected function Get(Index:...
阅读全文
摘要:procedure ExplorerMenuItem(MenuHandle: THandle);var MenuIndex: Integer; MenuCaptionArray: array[1..255] of Char; MenuCaptionString: String; ItemInfo: TMenuItemInfo; Buffer: array[0..20] of Char;begin ...
阅读全文
摘要:TButtonTest = class(TGraphicControl) public constructor Create(aOwner: TComponent); override; protected procedure Paint; override; end; constru...
阅读全文
摘要:本来我一直都是使用递归算法, 效率很低 下边这段代码是我原来写的 ----------------------------------------------------------------------------------------------------- procedure TForm1.GetDepartmentMsg; var Test, Test2 : TTreeNod...
阅读全文
摘要:var Str: TPoint; BarHand: THandle; begin GetCursorPos(Str); BarHand := GetDC(0); Panel1.Color := GetPixel(BarHand, Str.X, Str.Y); Caption := IntToStr(Panel1.Color);
阅读全文
摘要:procedure TForm1.StringGrid1DrawCell(Sender: TObject; ACol, ARow: Integer; Rect: TRect; State: TGridDrawState); begin if StringGrid1.Cells[10,ARow] = TestNo then begin StringGrid1.Canvas.Fon...
阅读全文