QQ登录

只需要一步,快速开始

 注册地址  找回密码
查看: 2482|回复: 0
打印 上一主题 下一主题

Create a form with a client edge

[复制链接]
字体大小: 正常 放大
韩冰        

823

主题

3

听众

4048

积分

我的地盘我做主

该用户从未签到

发帖功臣 元老勋章

跳转到指定楼层
1#
发表于 2005-1-26 01:39 |只看该作者 |倒序浏览
|招呼Ta 关注Ta

4 `& }; B+ g$ E4 o# v( U |% G5 K1 H Answer: % i8 U2 M9 d) ]4 L, ?! DYou can create a form with a client edge overriding the CreateParams function and adding the WS_EX_CLIENTEDGE style to Params.ExStyle.

8 B# M( f2 `4 \3 E! b6 _: Z

Step 1: Add the CreateParams prototype to the form class.

- `8 o# r! x/ s3 O$ e6 G; k3 l! f

private:/ }2 M8 `# u7 o2 v5 K3 d! N+ o void __fastcall CreateParams(TCreateParams &arams);

0 L& a* g D+ D8 }5 V# |( N

Step 2: Code the function.

- P2 {& m7 \4 U# ~

void __fastcall TForm1::CreateParams(TCreateParams &arams)3 }% H' J+ V8 G, A {) u. r& H7 R8 d TForm::CreateParams(Params); // call base class first6 c, u3 a/ R4 r Params.ExStyle |= WS_EX_CLIENTEDGE; // then add the style$ h" y6 |) Y* i8 K1 d8 E6 c2 k, M. E }

8 K, ^/ ` D, |1 W7 d8 u

If you would rather not bother with CreateParams, you can achieve identical results by placing a panel on your form. Set the Aligment property of the panel to alClient, set both BevelInner and BevelOuter to bvNone, and set the panel's BorderStyle property to bsSingle. ! A" ^9 b9 g7 Y7 O

zan
转播转播0 分享淘帖0 分享分享0 收藏收藏0 支持支持0 反对反对0 微信微信
您需要登录后才可以回帖 登录 | 注册地址

qq
收缩
  • 电话咨询

  • 04714969085
fastpost

关于我们| 联系我们| 诚征英才| 对外合作| 产品服务| QQ

手机版|Archiver| |繁體中文 手机客户端  

蒙公网安备 15010502000194号

Powered by Discuz! X2.5   © 2001-2013 数学建模网-数学中国 ( 蒙ICP备14002410号-3 蒙BBS备-0002号 )     论坛法律顾问:王兆丰

GMT+8, 2026-6-11 21:16 , Processed in 0.395332 second(s), 52 queries .

回顶部