I need to capture every double click on the title bar of a TForm. How can I do this?
Many thanks for every hint in advance,
Andreas
Use the TForm::OnCanResize event:
void __fastcall TForm1::FormCanResize(TObject *Sender, int &NewWidth,
int &NewHeight, bool &Resize)
Check the NewWidth and NewHeight parameters to see if the event is triggered
by an attempt to maximize or normalize the form.
HTH,
Ronnie
"Andreas" <nacht...@web.de> schreef in bericht news:3bb468a2$1_2@dnews...
class TMyForm : public TForm
{
typedef TForm inherited;
private:
void __fastcall WMNCLButtonDblClk(TMessage &Message);
public:
BEGIN_MESSAGE_MAP
VCL_MESSAGE_HANDLER(WM_NCLBUTTONDBLCLK, TMessage, WMNCLButtonDblClk)
END_MESSAGE_MAP(TForm)
};
void __fastcall TMyForm::WMNCLButtonDblClk(TMessage &Message)
{
if (Message.WParam == HTCAPTION)
{
// do something
Message.Result = 0;
}
else
inherited::Dispatch(&Message);
}
Gambit
"Andreas" <nacht...@web.de> wrote in message news:3bb468a2$1_2@dnews...