Pues la traducción del ejemplo que te puse al sistema de tratamiento de mensajes tipo delphi sería esta:
Código PHP:
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
//---------------------------------------------------------------------------
struct TWMMoving{
DWORD Msg;
int Edge;
PRect DragRect;
};
class TForm2 : public TForm
{
__published: // IDE-managed Components
private:
__fastcall WMMoving(TWMMoving &Message);
public: // User declarations
__fastcall TForm2(TComponent* Owner);
BEGIN_MESSAGE_MAP
VCL_MESSAGE_HANDLER(WM_MOVING, TWMMoving, WMMoving)
END_MESSAGE_MAP(TForm)
};
//---------------------------------------------------------------------------
extern PACKAGE TForm2 *Form2;
//---------------------------------------------------------------------------
#endif
Código PHP:
#include "Unit2.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm2 *Form2;
//---------------------------------------------------------------------------
__fastcall TForm2::TForm2(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
__fastcall TForm2::WMMoving(TWMMoving &Message)
{
if(Message.DragRect->Left < 50){
Message.DragRect->Left = 50;
Message.DragRect->Right = Left + Width;
}
}
Saludos.