|
& w3 s$ ?& q9 F$ D2 l4 P3 _& `2 W1 y
Answer: % o* r8 r( Y- ]2 {
You can create a form with a client edge overriding the CreateParams function and adding the WS_EX_CLIENTEDGE style to Params.ExStyle.
1 A) D& e2 q, zStep 1: Add the CreateParams prototype to the form class.
( i/ p+ p6 I! b T private:# Y8 w H6 [8 i9 _/ m' T
void __fastcall CreateParams(TCreateParams & arams); ) f; h$ e3 ?# q# k' u/ F/ M) }
Step 2: Code the function. 6 n- Z: P0 \- Z9 l
void __fastcall TForm1::CreateParams(TCreateParams & arams)0 Z+ N1 w: I8 i* K
{
1 q0 d) k5 o. H6 T) R5 ~6 ]* Z TForm::CreateParams(Params); // call base class first6 m( ^9 k8 Z6 }( u
Params.ExStyle |= WS_EX_CLIENTEDGE; // then add the style
T4 s; V+ N( C! }+ Q } ; e- j$ A' i& F. h& o
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. ' q/ n A( }1 J3 u! a3 W
|