我有一个用Delphi 2006编写的MDI应用程序,它使用默认主题运行XP.
有没有办法控制MDI儿童的外观,以避免每个窗口上的大型XP风格标题栏?
我已经尝试设置BorderStyle的MDIChildren到bsSizeToolWin,但他们仍然呈现正常的形态.
所有你需要的 - 重载程序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)
| 归档时间: |
|
| 查看次数: |
4753 次 |
| 最近记录: |