Delphi MDI应用程序和MDI Children的标题栏

Mar*_*ius 4 forms delphi mdi

我有一个用Delphi 2006编写的MDI应用程序,它使用默认主题运行XP.

有没有办法控制MDI儿童的外观,以避免每个窗口上的大型XP风格标题栏?

我已经尝试设置BorderStyleMDIChildrenbsSizeToolWin,但他们仍然呈现正常的形态.

Coo*_*gic 5

所有你需要的 - 重载程序CreateWindowHandle,如下所示:

unit CHILDWIN;
interface
uses Windows, Classes, Graphics, Forms, Controls, StdCtrls;

type
  TMDIChild = class(TForm)
  private
    { Private declarations }
  public
    { Public declarations }
    procedure CreateWindowHandle(const Params: TCreateParams); override;
  end;

implementation

{$R *.dfm}
procedure TMDIChild.CreateWindowHandle(const Params: TCreateParams);
begin
  inherited CreateWindowHandle(Params);
  SetWindowLong(Handle, GWL_EXSTYLE, WS_EX_TOOLWINDOW);
end;
end.
Run Code Online (Sandbox Code Playgroud)