|
5 D3 O$ @6 h3 \9 P- tAnswer: + U- `4 W* R) D( o
You can create a form with a client edge overriding the CreateParams function and adding the WS_EX_CLIENTEDGE style to Params.ExStyle. 4 ?) M8 A/ {; V# M/ V
Step 1: Add the CreateParams prototype to the form class.
0 V/ h) ]6 @7 R3 Z x private:. q( P/ k- V; L) q
void __fastcall CreateParams(TCreateParams & arams); 5 P: [5 i3 b( n# C. C7 j, D$ |
Step 2: Code the function.
/ l% t& P! r) u; K/ ^' w* \! d7 m8 { void __fastcall TForm1::CreateParams(TCreateParams & arams)
; H1 l4 d& ^, V. N1 T9 h1 s {
; z* i8 @' q5 W0 }) @% D e TForm::CreateParams(Params); // call base class first+ P# v8 k: _2 t2 C- ^+ V' P
Params.ExStyle |= WS_EX_CLIENTEDGE; // then add the style: y! } _7 p" B) e5 Q
} 5 c4 b& r* L" h' ?4 T" G# 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. 6 U( K5 H: v m
|