Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Catalog · How the catalog works

Random project

ShowMessageDetour

Shows how to detour a calls to ShowMessage and MessageDlg without requiring modifying of code/unit using those procedures at all.

View on GitHub

Anyone may press Interesting, signed in or not. It helps others find this project.

Member rating

No ratings yet.

Sign in to rate this project.

README

ShowMessageDetour

Related G+ post:https://plus.google.com/114988765220297924939/posts/gp3hgaHecYo

This project is in response to the above, particularly in respect of the question of how to shadow or alter the behaviour of an library procedure like ShowMessage or MessageDlg without altering the code in question. Paul Toth suggested adding a unit to shadow the calls with an $IFDEF which is one good suggestion, this demonstrates an alternative way that avoids even that change.