|
+ ^; |2 z; V. a& X% mAnswer:
N& ?2 ^' N4 z4 j4 B. ^You can create a form with a client edge overriding the CreateParams function and adding the WS_EX_CLIENTEDGE style to Params.ExStyle. , c9 o, l+ e3 ?- F
Step 1: Add the CreateParams prototype to the form class.
, l2 H% L* t' Y* ]* ^) Q private:
- i; S' E; I0 U4 l void __fastcall CreateParams(TCreateParams & arams); 7 X+ z }; h: ^
Step 2: Code the function.
0 c$ F, @0 ]' k6 ` void __fastcall TForm1::CreateParams(TCreateParams & arams)/ G: O8 |, U- O" k
{6 _; o# P% U+ c# s9 k
TForm::CreateParams(Params); // call base class first
% i" f# K' J- q) z4 Y; W Params.ExStyle |= WS_EX_CLIENTEDGE; // then add the style
5 `) b, ?, L8 z. z" s } 9 A# {# ~8 Q/ Y+ j$ m
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. 9 d/ v: \4 T2 e7 [7 a1 M7 w
|