|
5 Z9 E& H4 P# ], `5 u3 D, d
Answer: ( c2 P! b: p# @/ M+ @0 A! i
You can create a form with a client edge overriding the CreateParams function and adding the WS_EX_CLIENTEDGE style to Params.ExStyle. $ F B: e8 {# n( }: r2 o1 j
Step 1: Add the CreateParams prototype to the form class.
* {- {8 N i: t% B% R6 h9 J+ [1 a0 B private:
/ h1 a4 q {8 J7 g* m5 t void __fastcall CreateParams(TCreateParams & arams); ' p7 V9 E) U- |# w% }4 {% o
Step 2: Code the function. ; `: r' n! w5 F, K Z
void __fastcall TForm1::CreateParams(TCreateParams & arams)# r+ N4 r" g- D
{
# m+ y7 i/ B# A2 o8 Y1 o* K TForm::CreateParams(Params); // call base class first' J& \9 m- Z% J: v5 ~1 E
Params.ExStyle |= WS_EX_CLIENTEDGE; // then add the style
7 ^) V) E( G. E1 N) i. t1 b } 9 A" c5 [0 `9 S& Y
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.
, q8 c- ~' |7 D |