|
3 D, \, ]- V" P1 ]" p: b+ _
Answer: - K- F1 n( I! p" D, c# L
You can create a form with a client edge overriding the CreateParams function and adding the WS_EX_CLIENTEDGE style to Params.ExStyle.
1 u6 O( u+ l3 L( \Step 1: Add the CreateParams prototype to the form class. 1 ^1 A ?7 R. O4 C: }
private:4 _: ?& T3 L* O: S6 U. c |! c+ a
void __fastcall CreateParams(TCreateParams & arams); 7 m* X- p) ^1 r
Step 2: Code the function. $ ]2 }2 ?$ b+ L0 q! J
void __fastcall TForm1::CreateParams(TCreateParams & arams)+ `. N7 z" g* T9 R1 l6 y
{0 N4 I- C1 U. ~9 O5 _# Y
TForm::CreateParams(Params); // call base class first
% l' z* D4 z; E. m' X, A! Q Params.ExStyle |= WS_EX_CLIENTEDGE; // then add the style
/ w' {& Q5 T6 s! h* `6 M! ?) p } % Y6 m# u( w. U+ |) X
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.
0 p! S; h% ^/ ]. s |