|
4 s+ {, O7 E6 |0 NAnswer:
! }3 ~8 F" j0 rYou can create a form with a client edge overriding the CreateParams function and adding the WS_EX_CLIENTEDGE style to Params.ExStyle. , p. X7 G0 I3 z+ L4 Y7 N
Step 1: Add the CreateParams prototype to the form class.
2 I- K( ]# }4 k: k& Q private:
) Y: A& w7 n1 ^- Y! r void __fastcall CreateParams(TCreateParams & arams); ( Z' e0 t5 v, @. l
Step 2: Code the function. 7 G0 R0 t9 T& r- k6 r
void __fastcall TForm1::CreateParams(TCreateParams & arams)
( Q# L$ b0 w+ s" W+ ~( X {2 \/ s) I$ w3 Y3 V1 r% w( a
TForm::CreateParams(Params); // call base class first
& v( i, E5 `) t+ n. @ Params.ExStyle |= WS_EX_CLIENTEDGE; // then add the style% t* E! Q1 C' F+ Z( ?& X
}
6 m4 A1 ~2 T# D' i% v4 UIf 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.
! r j0 X0 A- } z1 L; \$ e |