Home > Back-end >  C Builder 6 Form minimize maximize response message
C Builder 6 Form minimize maximize response message

Time:10-06

What the Form at the time of minimize maximize response message, thought OnResize, but no response,

To answer, for free!

CodePudding user response:

 

-The class TForm12: public TForm
{
__published://IDE - managed Components
Private://User declarations
Void __fastcall mycomd (TMessage& Message);
Public://User declarations
__fastcall TForm12 (TComponent * Owner);

BEGIN_MESSAGE_MAP
MESSAGE_HANDLER (WM_SYSCOMMAND, TMessage mycomd)
END_MESSAGE_MAP (TForm)
};
- CPP
Void __fastcall TForm12: : mycomd (TMessage& Message)
{
If (Message. Msg==WM_SYSCOMMAND & amp; & Message. The WParam==SC_MAXIMIZE)
{
ShowMessage (" Max ");

}
Else if (Message. Msg==WM_SYSCOMMAND & amp; & Message. The WParam==SC_MINIMIZE)
{
ShowMessage (" min ");

}
TForm: : Dispatch (& amp; Message);
}

CodePudding user response:

 void __fastcall TForm12: : mycomd (TMessage& Message) 
{
If (Message. WParam==SC_MAXIMIZE)
{
ShowMessage (" Max ");

}
Else if (Message. WParam==SC_MINIMIZE)
{
ShowMessage (" min ");

}
TForm: : Dispatch (& amp; Message);
}
  • Related