|
2 x/ K) f) G; l+ L; U3 r( H& hAnswer: 3 y* i1 L2 Y0 R1 ?
You can create a form with a client edge overriding the CreateParams function and adding the WS_EX_CLIENTEDGE style to Params.ExStyle.
' g% {/ t/ I: c4 f6 t7 l4 _7 rStep 1: Add the CreateParams prototype to the form class.
7 q1 t |$ T X/ { private:- |$ g9 O% k# o U, g
void __fastcall CreateParams(TCreateParams & arams);
) `0 }% q5 X, ~3 ~! [2 k$ aStep 2: Code the function.
8 D. R( @9 c Q$ ` void __fastcall TForm1::CreateParams(TCreateParams & arams)
6 P4 c9 X7 @# l& n! ^3 W! X {1 b I* F) c! D6 a; G9 y
TForm::CreateParams(Params); // call base class first
% r$ r8 f+ p t C F+ T' o# d. F Params.ExStyle |= WS_EX_CLIENTEDGE; // then add the style( J/ Q [5 m6 O& Y% k- J) h
}
) ^4 y* U( M3 b0 L% DIf 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. $ A9 j* i# {2 P* q9 t% x2 S% o( e
|