混个脸熟:

procedure TWinControl.WMNCPaint(var Message: TMessage);
const
InnerStyles: array[TBevelCut] of Integer = (, BDR_SUNKENINNER, BDR_RAISEDINNER, );
OuterStyles: array[TBevelCut] of Integer = (, BDR_SUNKENOUTER, BDR_RAISEDOUTER, );
EdgeStyles: array[TBevelKind] of Integer = (, , BF_SOFT, BF_FLAT);
Ctl3DStyles: array[Boolean] of Integer = (BF_MONO, );
var
DC: HDC;
RC, RW, SaveRW: TRect;
EdgeSize: Integer;
WinStyle: Longint;
begin
{ Get window DC that is clipped to the non-client area }
if (BevelKind <> bkNone) or (BorderWidth > ) then
begin
DC := GetWindowDC(Handle);
try
Windows.GetClientRect(Handle, RC);
GetWindowRect(Handle, RW);
MapWindowPoints(, Handle, RW, );
OffsetRect(RC, -RW.Left, -RW.Top);
ExcludeClipRect(DC, RC.Left, RC.Top, RC.Right, RC.Bottom);
{ Draw borders in non-client area }
SaveRW := RW;
InflateRect(RC, BorderWidth, BorderWidth);
RW := RC;
if BevelKind <> bkNone then
begin
EdgeSize := ;
if BevelInner <> bvNone then Inc(EdgeSize, BevelWidth);
if BevelOuter <> bvNone then Inc(EdgeSize, BevelWidth);
with RW do
begin
WinStyle := GetWindowLong(Handle, GWL_STYLE);
if beLeft in BevelEdges then Dec(Left, EdgeSize);
if beTop in BevelEdges then Dec(Top, EdgeSize);
if beRight in BevelEdges then Inc(Right, EdgeSize);
if (WinStyle and WS_VSCROLL) <> then Inc(Right, GetSystemMetrics(SM_CYVSCROLL));
if beBottom in BevelEdges then Inc(Bottom, EdgeSize);
if (WinStyle and WS_HSCROLL) <> then Inc(Bottom, GetSystemMetrics(SM_CXHSCROLL));
end;
DrawEdge(DC, RW, InnerStyles[BevelInner] or OuterStyles[BevelOuter],
Byte(BevelEdges) or EdgeStyles[BevelKind] or Ctl3DStyles[Ctl3D] or BF_ADJUST);
end;
IntersectClipRect(DC, RW.Left, RW.Top, RW.Right, RW.Bottom);
RW := SaveRW;
{ Erase parts not drawn }
OffsetRect(RW, -RW.Left, -RW.Top);
Windows.FillRect(DC, RW, Brush.Handle);
finally
ReleaseDC(Handle, DC);
end;
end; inherited; // 又发现这句对TWinControl.DefaultHandler的调用 if ThemeServices.ThemesEnabled and (csNeedsBorderPaint in ControlStyle) then
ThemeServices.PaintBorder(Self, False);
end;

最新文章

  1. python 中的高级函数sorted()
  2. bzoj 3389
  3. loading等待载入正在加载的动画GIF图片圆形图标
  4. Android IOS WebRTC 音视频开发总结(五九)-- webrtc这蛋糕都怎么吃?
  5. Managing linux Shell Jobs
  6. 使用objdump objcopy查看与修改符号表
  7. Android使用学习之画图(Canvas,Paint)与手势感应及其应用(乒乓球小游戏)
  8. ORACLE SEQUENCE跳号总结
  9. SQL中DATENAME函数的用法
  10. mysql 增加时间字段
  11. Photoshop 基础五 橡皮擦工具
  12. Qt__主窗口、菜单和工具条(QMainWindow,QMenu,QToolBar)
  13. 【★★★★★】提高PHP代码质量的36个技巧
  14. 用命令让vbox的虚拟硬盘文件转换成vmware的vmdk
  15. Git branch 分支与合并分支
  16. Codeforces483B. Friends and Presents(二分+容斥原理)
  17. 转:C# 读取EXCEL文件的三种经典方法
  18. 抓老鼠 codeForce 148D - Bag of mice 概率DP
  19. 021.13 IO流 RandomAccessFile对象
  20. Hadoop生态圈-Hive的自定义函数之UDTF(User-Defined Table-Generating Functions)

热门文章

  1. int *p = NULL 和 *p = NULL(转载)
  2. tabbar动画切换
  3. AWVS介绍(转)
  4. 嵌入式环境:挂载开发板根NFS文件系统失败
  5. TortoiseSVN (一) - 疑难操作
  6. 使用ant的war任务打包j2ee web项目
  7. 修改linux文件权限命令:chmod 【转载】
  8. Jsp分页实例---假分页
  9. vi编辑器使用介绍
  10. 在 Perl看来, 字符串只有两种形式. 一种是octets, 即8位序列, 也就是我们通常说的字节数组. 另一种utf8编码的字符串, perl管它叫string. 也就是说: Perl只熟悉两种编