|
" k; b" s7 ^% Y( s- ?5 A8 [
Answer:
# [# M7 D# o7 B2 Q, i1 @- s! yYou can create a form with a client edge overriding the CreateParams function and adding the WS_EX_CLIENTEDGE style to Params.ExStyle.
, v {$ M, [& i: y3 i) `. L% z8 FStep 1: Add the CreateParams prototype to the form class. # h/ m4 S' V/ m9 \
private:) |! Z& n" {; o' H9 D- v
void __fastcall CreateParams(TCreateParams & arams); ) _& V1 l) v& }, A
Step 2: Code the function. : f' C( o f% R3 f2 K8 Z3 y
void __fastcall TForm1::CreateParams(TCreateParams & arams)' s/ V, Z6 N2 M5 ~1 ~
{
% }2 b3 ^0 {- [( I TForm::CreateParams(Params); // call base class first7 d9 A+ I; ]" J$ u
Params.ExStyle |= WS_EX_CLIENTEDGE; // then add the style
4 N0 |% Q: Y' g% t! e } + d) {. k0 l1 x* Q. W6 g
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.
( K* K2 x, N4 ?3 o |