|
% J' [- Q, L( F+ Z/ R$ N
Answer:
+ B% {9 c( N1 D$ B6 h- ]. N, m: kYou can create a form with a client edge overriding the CreateParams function and adding the WS_EX_CLIENTEDGE style to Params.ExStyle.
( w( i& R1 _. j' t5 |- k7 S) u, xStep 1: Add the CreateParams prototype to the form class. 2 I+ x. I0 m" D2 B. }8 m
private:
/ a3 o C! B. `9 ]- @$ p% B( v( ^ void __fastcall CreateParams(TCreateParams & arams);
+ a3 F* Y; z5 D0 k. l0 y9 iStep 2: Code the function.
4 ~5 ~; J( y/ Q* c' d void __fastcall TForm1::CreateParams(TCreateParams & arams)
; V- ?& P3 {& K$ ^4 C- p) P0 f {
4 R3 G6 n$ b j% O TForm::CreateParams(Params); // call base class first# s' k& d( Z, c# _+ \6 n2 b! ?
Params.ExStyle |= WS_EX_CLIENTEDGE; // then add the style) a( D0 A7 {" d3 v" A! s; y
} 9 s& @$ h& _/ p" {
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. 0 c: e) r9 Q% S) {8 k
|