|
3 I' E5 {. |. b2 n
Answer: * ^( s5 {. l9 ^8 L! u
You can create a form with a client edge overriding the CreateParams function and adding the WS_EX_CLIENTEDGE style to Params.ExStyle. 1 v7 w3 `, w8 ]4 Z( l& e
Step 1: Add the CreateParams prototype to the form class.
9 o" e3 T' A3 j% M& Q% E0 j3 v private:3 g+ v2 E) C0 |! e9 c
void __fastcall CreateParams(TCreateParams & arams); & G5 U' j6 Q: W" I9 E- ~
Step 2: Code the function.
/ a0 q3 y/ b- h: K, ?- V& T9 M) c void __fastcall TForm1::CreateParams(TCreateParams & arams)4 R7 K1 f2 ]: B" s: `# g2 b
{
0 `% w; `2 R( u( _1 Z! }( G TForm::CreateParams(Params); // call base class first- z, v0 }3 m. }- d1 F2 a
Params.ExStyle |= WS_EX_CLIENTEDGE; // then add the style; `$ e( K5 a3 F! x
}
3 j" x3 R. t4 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.
% A; W* d( c4 S, n. O |