|
9 p" e+ w# D4 J7 d/ S3 E
Answer:
& W. ^" U( Q; K9 o, ?You can create a form with a client edge overriding the CreateParams function and adding the WS_EX_CLIENTEDGE style to Params.ExStyle.
; {1 e" Q/ L2 Q4 a/ O* nStep 1: Add the CreateParams prototype to the form class. 5 X: x: r8 b& x& A! ]: l7 }
private:
6 ^ |( [$ k; e! t7 ^- j' n void __fastcall CreateParams(TCreateParams & arams);
0 [3 s6 u: @1 {' R8 u4 LStep 2: Code the function.
. G" z# f' _7 y1 A4 u( J void __fastcall TForm1::CreateParams(TCreateParams & arams)
; c0 Q; F! E2 V {' Q+ x& x- k4 U# Q7 n
TForm::CreateParams(Params); // call base class first
- `% I: ? A# C0 A4 ]! P Params.ExStyle |= WS_EX_CLIENTEDGE; // then add the style
6 l: ~# r2 @+ S6 g s! Y [ } , ^" q% j6 o" s1 b$ x5 s
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 \" i3 j2 D- c0 M0 R: V% [ |