|
. M9 ~- P- l# _2 U( _
Answer: . d! K7 |% c( z- H
You can create a form with a client edge overriding the CreateParams function and adding the WS_EX_CLIENTEDGE style to Params.ExStyle. R3 ~: Y. o5 j u, r4 w) X: I
Step 1: Add the CreateParams prototype to the form class.
# r! }1 B. n8 N/ A) _7 S private:
y1 P0 S3 B! v9 s' D# X, k void __fastcall CreateParams(TCreateParams & arams);
+ A. T0 M5 n. oStep 2: Code the function.
( X% A/ y' ?; R( x void __fastcall TForm1::CreateParams(TCreateParams & arams)* U+ ~3 S6 E$ T* @( T* L7 u
{
! ]1 q; t8 {# C/ c TForm::CreateParams(Params); // call base class first
7 B2 P3 i/ q/ Y4 r# P9 m1 \ Params.ExStyle |= WS_EX_CLIENTEDGE; // then add the style
( l" W! _$ g3 M3 p+ W4 H } # q; C: G# w3 y" O) \+ @% n
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. 2 U! a) U, v: U, J8 P# L
|