As noted through initial testing, porting your Delphi 3.x applications to 4.0 will require a few changes. Both are relatively straight forward.
Delphi 3.x - procedure Map1BeforeLayerDraw(Sender: TObject; index: Smallint; hDC: Integer);
Delphi 4.0 - procedure Map1BeforeLayerDraw(Sender: TObject; index: Smallint; hDC: Cardinal);
Delphi 3.x - procedure Map1AfterLayerDraw(Sender: TObject; index: Smallint; canceled: Wordbool; hDC: Integer);
Delphi 4.0 - procedure Map1AfterLayerDraw(Sender: TObject; index: Smallint; canceled: WordBool; hDC: Cardinal);
Delphi 3.x - procedure Map1BeforeTrackingLayerDraw(Sender: TObject; hDC: Integer);
Delphi 4.0 - procedure Map1BeforeTrackingLayerDraw(Sender: TObject; hDC: Cardinal);
Delphi 3.x - procedure Map1AfterTrackingLayerDraw(Sender: TObject; hDC: Integer);
Delphi 4.0 - procedure Map1AfterTrackingLayerDraw(Sender: TObject; hDC: Cardinal);