procedure TForm1.CreateParams(var Params: TCreateParams);
begin
  inherited;
  Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW;
end;
//(var Params: TCreateParams);
这个参数有什么用
//  inherited;是干什么用的
//这代码中那里是虚函数,那里是重载

解决方案 »

  1.   

    这应该是你以前提的一个问题的续了。
      inherited是继承,相当于祖先代码的拷贝,接着祖先的代码继续往下写。
      

  2.   

    //(var Params: TCreateParams);
    这个参数有什么用
    我问这个呀
    兄弟
      

  3.   

    这是窗口参数,窗口的参数都在里面,包括窗口style等
      

  4.   

    大伯,这个是帮助中的一段说明,我懒得再翻了。。主要是用来说明创建窗口时的参数,比如类型,状态(是否激活),标题。。等等等等等等。。
    以后你自个看帮助吧,大部分的内容都有啊。。
    TCreateParams is the window-creation parameter record used to specify the type of window to create for a windowed control.UnitControlstype  TCreateParams = record
        Caption: PChar;
        Style: DWORD;
        ExStyle: DWORD;
        X, Y: Integer;
        Width, Height: Integer;
        WndParent: HWND;
        Param: Pointer
        WindowClass: TWndClass;
        WinClassName: array[0..63] ofChar;  end;DescriptionThe TCreateParams type is a data structure holding information needed when telling Windows to create a window handle. The fields of a TCreateParams record become the parameters to a call to the CreateWindowEx API function.  TCreateParams contains the following fields:Field MeaningCaption The window caption.  This is usually the value of the Caption or Text property of the control.
    Style The Windows style for the window. This is a bit array of flags such as WS_CHILD or WS_DISABLED. See the Microsoft Windows documentation for possible flags.
    ExStyle The extended Windows style for the window. This is one of the Windows predefined extended style constants such as WS_EX_TOOLWINDOW or WS_EX_CONTROLPARENT. See the Microsoft Windows documentation for possible values.X The x coordinate of the left side of the window.  This is usually the same as the Left property.
    Y The y coordinate of the top of the window.  This is usually the same as the Top property.
    Width The width, in pixels, of the window. This is usually the same as the Width property.
    Height The height, in pixels, of the window. This is usually the same as the Height property.
    WndParent The window handle of the parent window. This is the same as the Handle property of the parent control or, if the Parent property is nil, the value of ParentWindow.Param A pointer to the windows creation parameter that is passed as the LParam of the WM_CREATE message.
    WindowClass The WindowClass record that describes the class of window being created. The WindowClass record includes information about the window procedure, style, default cursor, background brush, associated menus, and so on.
    WinClassName The window class name. This must be the name of a window class that has already been registered. Windows provides several built-in window classes with predefined names. Applications may also register their own custom window classes.