哈哈,收分了: controls.pas 的最下边
{ Initialization and cleanup }
procedure DoneControls;
begin
Application.Free;
Application := nil;
Screen.Free;
Screen := nil;
Mouse.Free;
Mouse := nil;
CanvasList.Free;
GlobalDeleteAtom(ControlAtom);
GlobalDeleteAtom(WindowAtom);
if IMM32DLL <> 0 then FreeLibrary(IMM32DLL);
end;
procedure InitControls;
var
AtomText: array[0..31] of Char;
begin
WindowAtom := GlobalAddAtom(StrFmt(AtomText, 'Delphi%.8X',
[GetCurrentProcessID]));
ControlAtom := GlobalAddAtom(
StrFmt(AtomText, 'ControlOfs%.8X%.8X', [HInstance, GetCurrentThreadID]));
CanvasList := TThreadList.Create;
InitIMM32;
Mouse := TMouse.Create;
Screen := TScreen.Create(nil);
Application := TApplication.Create(nil);
InitCtl3D;
Application.ShowHint := True;
RegisterIntegerConsts(TypeInfo(TCursor), IdentToCursor, CursorToIdent);
end;
initialization
NewStyleControls := Lo(GetVersion) >= 4;
InitControls;
finalization
DockSiteList.Free;
DoneControls;
我最喜欢看Delphi的源码了[
]就是没时间没机器看。准备买个掌上宝啥的,拷进去,揣兜里,有空就看。