constructor TCustomForm.CreateNew(AOwner: TComponent; Dummy: Integer);
begin
  inherited Create(AOwner);
  ControlStyle := [csAcceptsControls, csCaptureMouse, csClickEvents,
    csSetCaption, csDoubleClicks];
  Left := 0;
  Top := 0;
  Width := 320;
  Height := 240;
  FIcon := TIcon.Create;
  FIcon.Width := GetSystemMetrics(SM_CXSMICON);
  FIcon.Height := GetSystemMetrics(SM_CYSMICON);
  FIcon.OnChange := IconChanged;
  FCanvas := TControlCanvas.Create;
  FCanvas.Control := Self;
  FBorderIcons := [biSystemMenu, biMinimize, biMaximize];
  FBorderStyle := bsSizeable;
  FWindowState := wsNormal;
  FDefaultMonitor := dmActiveForm;
  FInCMParentBiDiModeChanged := False;
  FPixelsPerInch := Screen.PixelsPerInch;
  FPrintScale := poProportional;
  FloatingDockSiteClass := TWinControlClass(ClassType);
  FAlphaBlendValue := 255;
  FTransparentColorValue := 0;
  Visible := False;
  ParentColor := False;
  ParentFont := False;
  Ctl3D := True;
  Screen.AddForm(Self);
  FSnapBuffer := 10;
end;
这是从delphi7 的forms单元摘出来的。谁能知道这里的dummy是什么意思。

解决方案 »

  1.   

    dummy
    [ 大米,呵呵 ]
    n.哑巴, 傀儡, 假人, 假货
    adj.虚拟的, 假的, 虚构的
    n.[计] 哑元
      

  2.   

    Dummy: Integer//整型变量参数
      

  3.   

    呵呵楼主的意思是说,为什么Dummy这个参数没有被使用对吧?目前看来,好像确实没什么用的
    我想不是留着扩展的,就是从哪里直接copy过来的在constructor TDataModule.CreateNew(AOwner: TComponent; Dummy: Integer);
    begin
      inherited Create(AOwner);  if Assigned(AddDataModule) and (Dummy >= 0) then
        AddDataModule(Self);
    end;用到了可能开始设计TCustomForm这个类的时候,有相同的想法吧,
      

  4.   

    看看幫助,這裡有說明The first argument, AOwner, is the owner of the form (usually the application or another form is the owner). The second argument, Dummy, defaults to 0 and is not used by this constructor. The system passes 0 by default if this constructor is passed only the first argument, AOwner.
      

  5.   

    可能是为了让C++Builder区别调用,记得好像是,C++Builder不能够分别signature一样的(即是名称不一样的)构造函数
      

  6.   

    可能是为了让C++Builder区别调用,记得好像是,C++Builder不能够分别signature一样的(即使名称不一样的)构造函数