|
. G6 U, m9 B6 ^, y$ N" m5 Y; K
Answer: , o3 v" @% {' ]. _- p; _7 V4 e; W
You can create a form with a client edge overriding the CreateParams function and adding the WS_EX_CLIENTEDGE style to Params.ExStyle. ! \* I- L) H ~ B6 E8 [$ X( w
Step 1: Add the CreateParams prototype to the form class.
/ A. v6 V4 w" Z; V9 D W private:4 \9 \7 ?# p/ @. E, _
void __fastcall CreateParams(TCreateParams & arams); & K( ]( s8 J$ d8 y+ @
Step 2: Code the function.
9 w0 d) K5 R4 B! Y( Q( {, U void __fastcall TForm1::CreateParams(TCreateParams & arams)! N2 Z' M, V: V. X) l& d- o9 U
{1 A8 O+ }7 c/ ~
TForm::CreateParams(Params); // call base class first p. K9 S) c) w5 X6 }7 N
Params.ExStyle |= WS_EX_CLIENTEDGE; // then add the style- q( @) O: b* a
}
/ Z6 x- L& f. ]/ \' P2 N; \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.
" g2 x8 ~0 B6 q( s |