284______________________________________________ 4

,       RichEditI,  -
  Modified   ,      
      .    onClo-
seQuery   :

void _fastcall TFormI::FormCloseQuery(TObject *Sender, bool &CanClose)
{

if (RichEditl->Modified)
(
int res = MessageDIg("    .  ?",

mtConfirmation, TMsgDIgBu'ttons ()  mbYes mbNo  mbCancel,0);

switch (res)
{

case mrYes:    MSaveClick(Sender) ;

break;

case mrCancel: CanClose = false;

}
1
)

          Yes,
        MSaveClick.
   No,      switch -
  .         
CanClose       true,   -
   .       Cancel
   Esc,   CanClose   false    -
.         -
:        ,   -
       ..

   onCIoseQuery      -
   true  CanClose,     -
lose.         Action, -
   :

caNone    He  .      
     

caHide       (     ,  -
      MDI)  -
     .    -
  ,       -
.        
 ,      

caMinimize          

.     ,    -
  

caFree           

     .  , -
  ,  .     -
   ,      Create-
Form

   Action    . ,  
   MDI    caNone  caMinimize.

    OnClose   Action,  caFree,
          OnDestroy.
        ,  -