FORM的外观是平面,当然要保留标题篮了。还有。如何全面控制标题蓝,他的高度怎么改?关于标题蓝的消息除了这些还有什么。窗口外关创建的参数都有什么?
WM_NCActivate(var Msg:TWMNCActivate);
WM_SetText(var Msg:TWMSetText);
WM_NCHitTest(var Msg:TWMNCHitTest);还有,如何定义容器控件的CLIENTRECT?比如。从TPanel派生一个PANEL,如何定义它的CLIENTRECT?
WM_NCActivate(var Msg:TWMNCActivate);
WM_SetText(var Msg:TWMSetText);
WM_NCHitTest(var Msg:TWMNCHitTest);还有,如何定义容器控件的CLIENTRECT?比如。从TPanel派生一个PANEL,如何定义它的CLIENTRECT?
具体名字你可以查查 但不是WM_PAINT
然后在创建窗口是 将她的属性设置成 OWNDRAW
(仅供参考)
我现在手头没资料!^_^
可以写信给本人,希望各位高手多给给意见和批评!
([email protected])
( [email protected])
本人这套软件运行下来只是一种花俏而已,对于长期使用WINDOWS传统窗体
的用户来说可能会有一点不习惯,本人将窗体上的三个按钮,POPUPMENU传统
和菜单栏都做了大胆的改进,只希望能够创出自己的风格而已
以前的一个著名共享软件采用了这种方法!而你所想要的这种,去下载些第三方控件看看!
我先写个TFORM看看吧。
Windows, SysUtils, WinTypes, WinProcs, Messages, Classes, Controls,
Forms, Dialogs, StdCtrls, Buttons, ExtCtrls, Graphics;const
CaptionMinHeightPattern= 0;
CaptionHeightThreshold= 20; clHCDarkGreen= {clBlack} $00308912;
clHCMidGreen= {clTeal } $0089CEB2;
clHCLightGreen= {clYellow } $00CCF7E6;type
THCForm = class(TForm)
private
fCaptionHeight: integer; {height of the title bar in pixels}
fActiveCaption: boolean; {state of the title bar}
fSysMenu, fMin, fMax, fClose: boolean;
fMenuUp: boolean; {state of the system menu}
function TestWinStyle(dwStyleBit : longInt): boolean;
function HasCaption: boolean;
function GetCaptionRect(var Rect: TRect): boolean;
function GetCaptionButtonRect(Which: word; var Rect: TRect): boolean;
procedure DrawCaptionButton(DC: HDC; Which: word; Pressed: boolean);
function DrawCaption: boolean;
function DepressCaptionButton(Which: word) : boolean;
function DoSysMenu : boolean;
//procedure DrawWallpapper(DC: hDC);
protected
procedure WndProc(var Message: TMessage); override;
procedure WMNCCreate(var Message: TWMNCCreate); message WM_NCCREATE;
procedure WMNCCalcSize(var Message: TWMNCCalcSize); message WM_NCCALCSIZE;
procedure WMNCHitTest(var Message: TWMNCHitTest); message WM_NCHITTEST;
procedure WMNCLButtonDblClk(var Message: TWMNCLButtonDblClk); message WM_NCLBUTTONDBLCLK;
procedure WMNCLButtonDown(var Message: TWMNCLButtonDown); message WM_NCLBUTTONDOWN; procedure WMSize(var Message: TWMSize); message WM_SIZE;
procedure WMSysChar(var Message: TWMSysChar); message WM_SYSCHAR;
procedure WMCommand(var Message: TMessage); message WM_COMMAND;
procedure WMKeyDown(var Message: TWMKeyDown); message WM_KEYDOWN;
procedure WMKeyUp(var Message: TWMKeyUp); message WM_KEYUP;
procedure WMPaint(var Message: TWMPaint); message WM_PAINT;
procedure WMSysKeyDown(var Message: TWMSysKeyDown); message WM_SYSKEYDOWN;
procedure WMSysKeyUp(var Message: TWMSysKeyUp); message WM_SYSKEYUP;
procedure WMGetMinMaxInfo(var Message: TWMGetMinMaxInfo); message WM_GETMINMAXINFO;
procedure WMNCPaint(var Msg : TWMNCPaint); message WM_NCPAINT;
public
constructor Create(Owner: TComponent); override;
destructor Destroy; override;
end;implementation{$R *.DFM}
{$R Button.res}type
PSysMenuItem= ^TSysMenuItem;
TSysMenuItem= Packed Record
SysMenuItemID: DWORD;
SysMenuItemText: PChar;
End;//得到窗口的Style
function THCForm.TestWinStyle(dwStyleBit: longInt): boolean;
begin
Result:= ((GetWindowLong(Handle, GWL_STYLE) AND dwStyleBit) <> 0);
end;